What's a reasonable size ratio for toom32?
Niels Möller
nisse at lysator.liu.se
Wed Sep 27 09:40:26 CEST 2023
Niels Möller <nisse at lysator.liu.se> writes:
> Paul Zimmermann <Paul.Zimmermann at inria.fr> writes:
>
>> Dear Niels,
>>
>> ./speed -p 1000000 -c -s 10-200 -f1.1 mpn_mul.0.6 would be more readable,
>> although the change in speed.h would be larger.
>
> See below patch, to support mpn_mul/0.6. Example output:
>
> $ ./speed -c -r -s 10-50 -t 5 -p 1000000 mpn_mul mpn_mul/0.6
> overhead 5.00 cycles, precision 1000000 units of 1.25e-09 secs, CPU freq 798.28 MHz
> mpn_mul mpn_mul/0.6
> 10 215.48 #0.6295
> 15 443.16 #0.6066
> 20 784.50 #0.6138
> 25 1209.57 #0.5957
> 30 1490.59 #0.6934
> 35 1986.51 #0.6918
> 40 2547.99 #0.6981
> 45 3189.27 #0.6633
> 50 3827.87 #0.6734
>
> What do you think? (Also deleted FLAG_RSIZE, which appeared unused).
I pushed this change, then found out it was a bit broken (failed to
recognize old optional .r option, and it seems initialization of the
size_ratio field with memset produces a float value > 0.0). Just pushed
a fix for that.
And now I found that speed's handling of toom22, toom32 and friends
always use fixed ratios, so I have to extend that to be able to get any
interesting benchmarks when varying the ratio.
Regards,
/Niels
--
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.
More information about the gmp-devel
mailing list