diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-07-01 03:50:03 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-07-01 03:50:03 +0200 |
commit | 9e6132c0e47b251dbe2ff454dae8a38acca7bfd1 (patch) | |
tree | d0b64340b10d23ac3a249110093efc8a8113c668 /gmp-impl.h | |
parent | 18d44f8f888a3b40e93bb48ad236885dc06cfcb5 (diff) | |
download | gmp-9e6132c0e47b251dbe2ff454dae8a38acca7bfd1.tar.gz |
* gmp-impl.h (DIVEXACT_1_THRESHOLD): Make the default 0 when
2*UMUL_TIME < UDIV_TIME.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r-- | gmp-impl.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gmp-impl.h b/gmp-impl.h index 3f465dd3c..9c23554ee 100644 --- a/gmp-impl.h +++ b/gmp-impl.h @@ -1404,12 +1404,11 @@ mp_limb_t mpn_invert_limb _PROTO ((mp_limb_t)) ATTRIBUTE_CONST; void mpn_divexact_1 _PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); /* mpn_divexact_1 takes roughly 2 multiplies, so don't bother unless that's - faster than a division. When divexact is worth doing it has to calculate - a modular inverse, so it's probably only above a certain size it'll be - best, choose 5 as an guess for that. */ + faster than a division. On most processors where mul is twice as fast as + division the threshold comes out as 0, so make that the default. */ #ifndef DIVEXACT_1_THRESHOLD #if 2*UMUL_TIME < UDIV_TIME -#define DIVEXACT_1_THRESHOLD 5 +#define DIVEXACT_1_THRESHOLD 0 #else #define DIVEXACT_1_THRESHOLD MP_SIZE_T_MAX #endif |