diff options
author | Niels M?ller <nisse@lysator.liu.se> | 2019-09-05 21:10:05 +0200 |
---|---|---|
committer | Niels M?ller <nisse@lysator.liu.se> | 2019-09-05 21:10:05 +0200 |
commit | 9c489cead96f7d38dd428d274805fc9cd48514fa (patch) | |
tree | 82af0b57717216c477c939c01f7f461ab043777a /tune/speed.c | |
parent | 95d545683e958f411d896cc9ae55507c144a063a (diff) | |
download | gmp-9c489cead96f7d38dd428d274805fc9cd48514fa.tar.gz |
For hgcd2, add a div1 function handling q <= 7 specially.
* mpn/generic/hgcd2.c (div1): Return both r and q as a
mp_double_limb_t, replacing the DIV1 macro.
(div1) [HGCD2_METHOD == 3]: New implementation handling q <= 7
specially and without branches. Based on Torbj?rn's mail to the
gmp-devel list.
* tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add
corresponding speed support.
* tune/hgcd2-3.c: New file.
* tune/tuneup.c (print_define_with_speedup): New function, to
output a comment with speedup compared to next-best method.
(tune_hgcd2): Update tuning.
Diffstat (limited to 'tune/speed.c')
-rw-r--r-- | tune/speed.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tune/speed.c b/tune/speed.c index b46d94476..4f5a348ae 100644 --- a/tune/speed.c +++ b/tune/speed.c @@ -288,6 +288,7 @@ const struct routine_t { { "mpn_hgcd2", speed_mpn_hgcd2, FLAG_NODATA }, { "mpn_hgcd2_1", speed_mpn_hgcd2_1, FLAG_NODATA }, { "mpn_hgcd2_2", speed_mpn_hgcd2_2, FLAG_NODATA }, + { "mpn_hgcd2_3", speed_mpn_hgcd2_3, FLAG_NODATA }, { "mpn_hgcd", speed_mpn_hgcd }, { "mpn_hgcd_lehmer", speed_mpn_hgcd_lehmer }, { "mpn_hgcd_appr", speed_mpn_hgcd_appr }, |