[Gmp-commit] /var/hg/gmp: Retune, adding several new THRESHOLDs.

mercurial at gmplib.org mercurial at gmplib.org
Thu Nov 17 22:19:35 CET 2011


details:   /var/hg/gmp/rev/42b23f369c5e
changeset: 14455:42b23f369c5e
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Thu Nov 17 22:19:28 2011 +0100
description:
Retune, adding several new THRESHOLDs.

diffstat:

 mpn/alpha/ev5/gmp-mparam.h            |   40 +++++---
 mpn/alpha/ev6/gmp-mparam.h            |   76 ++++++++++--------
 mpn/ia64/gmp-mparam.h                 |  142 ++++++++++++++++++++++-----------
 mpn/pa64/gmp-mparam.h                 |   62 ++++++++------
 mpn/powerpc64/mode64/p4/gmp-mparam.h  |   31 ++++--
 mpn/powerpc64/mode64/p5/gmp-mparam.h  |   39 +++++---
 mpn/powerpc64/mode64/p6/gmp-mparam.h  |   37 +++++---
 mpn/powerpc64/mode64/p7/gmp-mparam.h  |   32 ++++---
 mpn/s390_64/gmp-mparam.h              |   16 ++-
 mpn/sparc64/ultrasparc34/gmp-mparam.h |   29 ++++--
 mpn/sparc64/ultrasparct1/gmp-mparam.h |   36 +++++---
 mpn/x86/atom/gmp-mparam.h             |   41 +++++----
 mpn/x86/k7/gmp-mparam.h               |   45 ++++++----
 mpn/x86/p6/sse2/gmp-mparam.h          |   61 ++++++++------
 mpn/x86/pentium4/sse2/gmp-mparam.h    |   83 ++++++++++---------
 mpn/x86_64/atom/gmp-mparam.h          |   17 ++-
 mpn/x86_64/bobcat/gmp-mparam.h        |   10 +-
 mpn/x86_64/core2/gmp-mparam.h         |   23 +++--
 mpn/x86_64/coreinhm/gmp-mparam.h      |   23 +++--
 mpn/x86_64/coreisbr/gmp-mparam.h      |  132 +++++++++++++++++++++++--------
 mpn/x86_64/gmp-mparam.h               |   13 ++-
 mpn/x86_64/nano/gmp-mparam.h          |   33 ++++---
 mpn/x86_64/pentium4/gmp-mparam.h      |   51 ++++++-----
 23 files changed, 658 insertions(+), 414 deletions(-)

diffs (truncated from 2001 to 300 lines):

diff -r d16bf0344fd8 -r 42b23f369c5e mpn/alpha/ev5/gmp-mparam.h
--- a/mpn/alpha/ev5/gmp-mparam.h	Thu Nov 17 21:24:47 2011 +0100
+++ b/mpn/alpha/ev5/gmp-mparam.h	Thu Nov 17 22:19:28 2011 +0100
@@ -26,38 +26,44 @@
 
 #define DIVREM_1_NORM_THRESHOLD              0  /* preinv always */
 #define DIVREM_1_UNNORM_THRESHOLD            0  /* always */
+#define MOD_1_1P_METHOD                      2
 #define MOD_1_NORM_THRESHOLD                 0  /* always */
 #define MOD_1_UNNORM_THRESHOLD               0  /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD         29
+#define MOD_1N_TO_MOD_1_1_THRESHOLD          6
 #define MOD_1U_TO_MOD_1_1_THRESHOLD          2
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD         8  /* never mpn_mod_1_1p */
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD         4
 #define MOD_1_2_TO_MOD_1_4_THRESHOLD        14
-#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     75
+#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     15
 #define USE_PREINV_DIVREM_1                  1  /* preinv always */
+#define DIV_QR_2_PI2_THRESHOLD              21
 #define DIVEXACT_1_THRESHOLD                 0  /* always */
-#define BMOD_1_TO_MOD_1_THRESHOLD           80
+#define BMOD_1_TO_MOD_1_THRESHOLD           78
 
-#define MUL_TOOM22_THRESHOLD                18
-#define MUL_TOOM33_THRESHOLD                61
-#define MUL_TOOM44_THRESHOLD                88
+#define MUL_TOOM22_THRESHOLD                14
+#define MUL_TOOM33_THRESHOLD                57
+#define MUL_TOOM44_THRESHOLD               118
 #define MUL_TOOM6H_THRESHOLD               173
-#define MUL_TOOM8H_THRESHOLD                 0
+#define MUL_TOOM8H_THRESHOLD               240
 
 #define MUL_TOOM32_TO_TOOM43_THRESHOLD      57
 #define MUL_TOOM32_TO_TOOM53_THRESHOLD      91
-#define MUL_TOOM42_TO_TOOM53_THRESHOLD      89
-#define MUL_TOOM42_TO_TOOM63_THRESHOLD      60
+#define MUL_TOOM42_TO_TOOM53_THRESHOLD      81
+#define MUL_TOOM42_TO_TOOM63_THRESHOLD      56
 
 #define SQR_BASECASE_THRESHOLD               4
 #define SQR_TOOM2_THRESHOLD                 28
-#define SQR_TOOM3_THRESHOLD                 65
+#define SQR_TOOM3_THRESHOLD                 77
 #define SQR_TOOM4_THRESHOLD                136
-#define SQR_TOOM6_THRESHOLD                180
-#define SQR_TOOM8_THRESHOLD                248
+#define SQR_TOOM6_THRESHOLD                173
+#define SQR_TOOM8_THRESHOLD                260
+
+#define MULMID_TOOM42_THRESHOLD             20
 
 #define MULMOD_BNM1_THRESHOLD               11
 #define SQRMOD_BNM1_THRESHOLD               13
 
+#define POWM_SEC_TABLE  2,17,322,387
+
 #define MUL_FFT_MODF_THRESHOLD             244  /* k = 5 */
 #define MUL_FFT_TABLE3                                      \
   { {    244, 5}, {     11, 6}, {      6, 5}, {     13, 6}, \
@@ -161,9 +167,11 @@
 #define MU_BDIV_Q_THRESHOLD                942
 
 #define MATRIX22_STRASSEN_THRESHOLD         13
-#define HGCD_THRESHOLD                     101
-#define GCD_DC_THRESHOLD                   330
-#define GCDEXT_DC_THRESHOLD                222
+#define HGCD_THRESHOLD                     105
+#define HGCD_APPR_THRESHOLD                111
+#define HGCD_REDUCE_THRESHOLD             1437
+#define GCD_DC_THRESHOLD                   318
+#define GCDEXT_DC_THRESHOLD                214
 #define JACOBI_BASE_METHOD                   2
 
 #define GET_STR_DC_THRESHOLD                16
diff -r d16bf0344fd8 -r 42b23f369c5e mpn/alpha/ev6/gmp-mparam.h
--- a/mpn/alpha/ev6/gmp-mparam.h	Thu Nov 17 21:24:47 2011 +0100
+++ b/mpn/alpha/ev6/gmp-mparam.h	Thu Nov 17 22:19:28 2011 +0100
@@ -29,38 +29,44 @@
 
 #define DIVREM_1_NORM_THRESHOLD              0  /* preinv always */
 #define DIVREM_1_UNNORM_THRESHOLD            0  /* always */
+#define MOD_1_1P_METHOD                      2
 #define MOD_1_NORM_THRESHOLD                 0  /* always */
 #define MOD_1_UNNORM_THRESHOLD               0  /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD          4
+#define MOD_1N_TO_MOD_1_1_THRESHOLD          3
 #define MOD_1U_TO_MOD_1_1_THRESHOLD          2
-#define MOD_1_1_TO_MOD_1_2_THRESHOLD         6
-#define MOD_1_2_TO_MOD_1_4_THRESHOLD        30
-#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     10
+#define MOD_1_1_TO_MOD_1_2_THRESHOLD         4
+#define MOD_1_2_TO_MOD_1_4_THRESHOLD        16
+#define PREINV_MOD_1_TO_MOD_1_THRESHOLD      8
 #define USE_PREINV_DIVREM_1                  1  /* preinv always */
+#define DIV_QR_2_PI2_THRESHOLD               8
 #define DIVEXACT_1_THRESHOLD                 0  /* always */
-#define BMOD_1_TO_MOD_1_THRESHOLD           16
+#define BMOD_1_TO_MOD_1_THRESHOLD           20
 
 #define MUL_TOOM22_THRESHOLD                35
-#define MUL_TOOM33_THRESHOLD                74
-#define MUL_TOOM44_THRESHOLD               178
-#define MUL_TOOM6H_THRESHOLD               288
-#define MUL_TOOM8H_THRESHOLD               333
+#define MUL_TOOM33_THRESHOLD                77
+#define MUL_TOOM44_THRESHOLD               184
+#define MUL_TOOM6H_THRESHOLD               228
+#define MUL_TOOM8H_THRESHOLD               288
 
-#define MUL_TOOM32_TO_TOOM43_THRESHOLD      75
-#define MUL_TOOM32_TO_TOOM53_THRESHOLD     101
+#define MUL_TOOM32_TO_TOOM43_THRESHOLD      89
+#define MUL_TOOM32_TO_TOOM53_THRESHOLD     110
 #define MUL_TOOM42_TO_TOOM53_THRESHOLD     105
-#define MUL_TOOM42_TO_TOOM63_THRESHOLD     105
+#define MUL_TOOM42_TO_TOOM63_THRESHOLD      73
 
-#define SQR_BASECASE_THRESHOLD               5
-#define SQR_TOOM2_THRESHOLD                 61
-#define SQR_TOOM3_THRESHOLD                107
-#define SQR_TOOM4_THRESHOLD                170
-#define SQR_TOOM6_THRESHOLD                309
-#define SQR_TOOM8_THRESHOLD                360
+#define SQR_BASECASE_THRESHOLD               0  /* always */
+#define SQR_TOOM2_THRESHOLD                 58
+#define SQR_TOOM3_THRESHOLD                103
+#define SQR_TOOM4_THRESHOLD                172
+#define SQR_TOOM6_THRESHOLD                264
+#define SQR_TOOM8_THRESHOLD                333
+
+#define MULMID_TOOM42_THRESHOLD             52
 
 #define MULMOD_BNM1_THRESHOLD               20
 #define SQRMOD_BNM1_THRESHOLD               23
 
+#define POWM_SEC_TABLE  4,17,246,2388
+
 #define MUL_FFT_MODF_THRESHOLD             480  /* k = 5 */
 #define MUL_FFT_TABLE3                                      \
   { {    480, 5}, {     18, 6}, {     10, 5}, {     21, 6}, \
@@ -148,19 +154,19 @@
 #define SQR_FFT_THRESHOLD                 3136
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
-#define MULLO_DC_THRESHOLD                 130
-#define MULLO_MUL_N_THRESHOLD            15604
+#define MULLO_DC_THRESHOLD                 173
+#define MULLO_MUL_N_THRESHOLD            11355
 
-#define DC_DIV_QR_THRESHOLD                119
-#define DC_DIVAPPR_Q_THRESHOLD             390
+#define DC_DIV_QR_THRESHOLD                112
+#define DC_DIVAPPR_Q_THRESHOLD             422
 #define DC_BDIV_QR_THRESHOLD               110
-#define DC_BDIV_Q_THRESHOLD                318
+#define DC_BDIV_Q_THRESHOLD                348
 
-#define INV_MULMOD_BNM1_THRESHOLD           75
-#define INV_NEWTON_THRESHOLD               390
-#define INV_APPR_THRESHOLD                 372
+#define INV_MULMOD_BNM1_THRESHOLD           68
+#define INV_NEWTON_THRESHOLD               402
+#define INV_APPR_THRESHOLD                 396
 
-#define BINV_NEWTON_THRESHOLD              393
+#define BINV_NEWTON_THRESHOLD              399
 #define REDC_1_TO_REDC_N_THRESHOLD         110
 
 #define MU_DIV_QR_THRESHOLD               1718
@@ -170,12 +176,14 @@
 #define MU_BDIV_Q_THRESHOLD               1652
 
 #define MATRIX22_STRASSEN_THRESHOLD         17
-#define HGCD_THRESHOLD                     282
-#define GCD_DC_THRESHOLD                  1138
-#define GCDEXT_DC_THRESHOLD                773
+#define HGCD_THRESHOLD                     278
+#define HGCD_APPR_THRESHOLD                366
+#define HGCD_REDUCE_THRESHOLD             2681
+#define GCD_DC_THRESHOLD                  1258
+#define GCDEXT_DC_THRESHOLD                777
 #define JACOBI_BASE_METHOD                   3
 
-#define GET_STR_DC_THRESHOLD                14
-#define GET_STR_PRECOMPUTE_THRESHOLD        19
-#define SET_STR_DC_THRESHOLD              3754
-#define SET_STR_PRECOMPUTE_THRESHOLD      8097
+#define GET_STR_DC_THRESHOLD                13
+#define GET_STR_PRECOMPUTE_THRESHOLD        25
+#define SET_STR_DC_THRESHOLD              3539
+#define SET_STR_PRECOMPUTE_THRESHOLD      7784
diff -r d16bf0344fd8 -r 42b23f369c5e mpn/ia64/gmp-mparam.h
--- a/mpn/ia64/gmp-mparam.h	Thu Nov 17 21:24:47 2011 +0100
+++ b/mpn/ia64/gmp-mparam.h	Thu Nov 17 22:19:28 2011 +0100
@@ -1,6 +1,6 @@
 /* gmp-mparam.h -- Compiler/machine parameter header file.
 
-Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software
+Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010, 2011 Free Software
 Foundation, Inc.
 
 This file is part of the GNU MP Library.
@@ -21,70 +21,92 @@
 #define GMP_LIMB_BITS 64
 #define BYTES_PER_MP_LIMB 8
 
-/* 1300MHz Itanium2 (babe.fsffrance.org) */
+/* 900MHz Itanium2 (titanic.gmplib.org) */
 
-
+#define MOD_1_1P_METHOD                      2
 #define MOD_1_NORM_THRESHOLD                 0  /* always */
 #define MOD_1_UNNORM_THRESHOLD               0  /* always */
-#define MOD_1N_TO_MOD_1_1_THRESHOLD          4
+#define MOD_1N_TO_MOD_1_1_THRESHOLD          3
 #define MOD_1U_TO_MOD_1_1_THRESHOLD          8
 #define MOD_1_1_TO_MOD_1_2_THRESHOLD         0  /* never mpn_mod_1_1p */
 #define MOD_1_2_TO_MOD_1_4_THRESHOLD        21
-#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     22
+#define PREINV_MOD_1_TO_MOD_1_THRESHOLD     10
 #define USE_PREINV_DIVREM_1                  1  /* native */
+#define DIV_QR_2_PI2_THRESHOLD              12
 #define DIVEXACT_1_THRESHOLD                 0  /* always (native) */
 #define BMOD_1_TO_MOD_1_THRESHOLD        MP_SIZE_T_MAX  /* never */
 
 #define MUL_TOOM22_THRESHOLD                40
-#define MUL_TOOM33_THRESHOLD               122
-#define MUL_TOOM44_THRESHOLD               212
+#define MUL_TOOM33_THRESHOLD               129
+#define MUL_TOOM44_THRESHOLD               214
 #define MUL_TOOM6H_THRESHOLD               318
 #define MUL_TOOM8H_THRESHOLD               430
 
-#define MUL_TOOM32_TO_TOOM43_THRESHOLD      93
-#define MUL_TOOM32_TO_TOOM53_THRESHOLD     146
-#define MUL_TOOM42_TO_TOOM53_THRESHOLD     129
+#define MUL_TOOM32_TO_TOOM43_THRESHOLD      97
+#define MUL_TOOM32_TO_TOOM53_THRESHOLD     145
+#define MUL_TOOM42_TO_TOOM53_THRESHOLD     126
 #define MUL_TOOM42_TO_TOOM63_THRESHOLD     151
 
 #define SQR_BASECASE_THRESHOLD              11
 #define SQR_TOOM2_THRESHOLD                 84
-#define SQR_TOOM3_THRESHOLD                125
+#define SQR_TOOM3_THRESHOLD                135
 #define SQR_TOOM4_THRESHOLD                494
-#define SQR_TOOM6_THRESHOLD                  0  /* never toom4 */
-#define SQR_TOOM8_THRESHOLD                  0  /* never toom6 */
+#define SQR_TOOM6_THRESHOLD                  0  /* always */
+#define SQR_TOOM8_THRESHOLD                  0  /* always */
 
 #define MULMOD_BNM1_THRESHOLD               23
-#define SQRMOD_BNM1_THRESHOLD               25
+#define SQRMOD_BNM1_THRESHOLD               28
 
-#define MUL_FFT_MODF_THRESHOLD             444  /* k = 5 */
+#define POWM_SEC_TABLE  2,29,130,905
+
+#define MUL_FFT_MODF_THRESHOLD             476  /* k = 5 */
 #define MUL_FFT_TABLE3                                      \
-  { {    444, 5}, {     27, 6}, {     14, 5}, {     29, 6}, \
-    {     35, 7}, {     18, 6}, {     37, 7}, {     19, 6}, \
+  { {    476, 5}, {     27, 6}, {     14, 5}, {     29, 6}, \
+    {     33, 7}, {     17, 6}, {     37, 7}, {     19, 6}, \
     {     39, 7}, {     21, 6}, {     43, 7}, {     33, 8}, \
     {     17, 7}, {     37, 8}, {     19, 7}, {     39, 8}, \
-    {     21, 7}, {     43, 8}, {     29, 9}, {     15, 8}, \
-    {     37, 9}, {     19, 8}, {     43, 9}, {     23, 8}, \
-    {     49, 9}, {     27, 8}, {     57, 9}, {     31, 8}, \
-    {     63, 9}, {     35, 8}, {     71, 9}, {     43,10}, \
+    {     21, 7}, {     43, 8}, {     37, 9}, {     19, 8}, \
+    {     43, 9}, {     23, 8}, {     51, 9}, {     27, 8}, \
+    {     57, 9}, {     31, 8}, {     63, 9}, {     43,10}, \
     {     23, 9}, {     59,10}, {     31, 9}, {     71,10}, \
-    {     39, 9}, {     87,10}, {     47, 9}, {     99,10}, \
+    {     39, 9}, {     83,10}, {     47, 9}, {     99,10}, \
     {     55,11}, {     31,10}, {     87,11}, {     47,10}, \
     {    111,12}, {     31,11}, {     63,10}, {    143,11}, \
     {     79,10}, {    167,11}, {     95,10}, {    191,11}, \
     {    111,12}, {     63,11}, {    143,10}, {    287, 9}, \
     {    575,10}, {    303,11}, {    159,10}, {    319,12}, \
     {     95,11}, {    191,10}, {    399,11}, {    207,10}, \
-    {    431,13}, {   8192,14}, {  16384,15}, {  32768,16}, \
-    {  65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \
-    {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} }
-#define MUL_FFT_TABLE3_SIZE 76
+    {    431,13}, {     63,12}, {    127,11}, {    271,10}, \
+    {    543,11}, {    287,10}, {    575,11}, {    303,12}, \
+    {    159,11}, {    335,10}, {    671,11}, {    367,12}, \
+    {    191,11}, {    399,10}, {    799,11}, {    431,12}, \
+    {    223,11}, {    447,13}, {    127,12}, {    255,11}, \
+    {    543,12}, {    287,11}, {    607,12}, {    319,11}, \
+    {    671,12}, {    351,11}, {    703,13}, {    191,12}, \
+    {    415,11}, {    863,12}, {    447,14}, {    127,13}, \
+    {    255,12}, {    607,13}, {    319,12}, {    735,13}, \
+    {    383,12}, {    799,11}, {   1599,12}, {    863,13}, \
+    {    447,12}, {    927,11}, {   1855,14}, {    255,13}, \
+    {    511,12}, {   1055,13}, {    575,12}, {   1215,13}, \


More information about the gmp-commit mailing list