[Gmp-commit] /var/hg/gmp: Small correction to fac_ui thresholds computation.
mercurial at gmplib.org
mercurial at gmplib.org
Wed Jan 4 14:59:36 CET 2012
details: /var/hg/gmp/rev/38f6ba0ae094
changeset: 14558:38f6ba0ae094
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Mon Jan 02 17:19:55 2012 +0100
description:
Small correction to fac_ui thresholds computation.
diffstat:
ChangeLog | 4 ++++
tune/tuneup.c | 17 ++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
diffs (54 lines):
diff -r b8bcd99d21a9 -r 38f6ba0ae094 ChangeLog
--- a/ChangeLog Sat Dec 31 18:56:47 2011 +0100
+++ b/ChangeLog Mon Jan 02 17:19:55 2012 +0100
@@ -1,3 +1,7 @@
+2012-01-02 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * tune/tuneup.c (tune_fac_ui): Compute FAC_DSC before FAC_ODD.
+
2011-12-31 Torbjorn Granlund <tege at gmplib.org>
* Makefile.am (fac_ui.h): Put file in top-level dir, not in mpz.
diff -r b8bcd99d21a9 -r 38f6ba0ae094 tune/tuneup.c
--- a/tune/tuneup.c Sat Dec 31 18:56:47 2011 +0100
+++ b/tune/tuneup.c Mon Jan 02 17:19:55 2012 +0100
@@ -1,7 +1,7 @@
/* Create tuned thresholds for various algorithms.
-Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010, 2011
-Free Software Foundation, Inc.
+Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010,
+2011, 2012 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -214,7 +214,7 @@
mp_size_t get_str_precompute_threshold = MP_SIZE_T_MAX;
mp_size_t set_str_dc_threshold = MP_SIZE_T_MAX;
mp_size_t set_str_precompute_threshold = MP_SIZE_T_MAX;
-mp_size_t fac_odd_threshold = MP_SIZE_T_MAX;
+mp_size_t fac_odd_threshold = 0;
mp_size_t fac_dsc_threshold = FAC_DSC_THRESHOLD_LIMIT;
mp_size_t fft_modf_sqr_threshold = MP_SIZE_T_MAX;
@@ -2628,15 +2628,14 @@
param.function = speed_mpz_fac_ui_tune;
- param.name = "FAC_ODD_THRESHOLD";
- param.min_size = 3;
- param.min_is_always = 0;
- one (&fac_odd_threshold, ¶m);
-
param.name = "FAC_DSC_THRESHOLD";
- param.min_size = MAX (32, fac_odd_threshold);
+ param.min_size = 32;
param.max_size = FAC_DSC_THRESHOLD_LIMIT;
one (&fac_dsc_threshold, ¶m);
+
+ param.name = "FAC_ODD_THRESHOLD";
+ param.min_size = 9;
+ one (&fac_odd_threshold, ¶m);
}
void
More information about the gmp-commit
mailing list