Fast Multiplication

paul zimmermann Paul.Zimmermann at inria.fr
Fri Nov 20 08:04:59 UTC 2015


> Date: Thu, 19 Nov 2015 12:11:54 +0100
> From: David Baumgärtel <baumgaertel.david at googlemail.com>
> 
> Hello!
> I am a german student and I have a problem regarding the multiplication
> algorithms. I need to adjust the thresholds "MUL_KARATSUBA_THRESHOLD" and
> so on to force the usage of a particular multiplication algorithm. But that
> doesn't work like I want it to work, because the .h and .c files in which
> the algorithms are defined are precompiled.
> Is there any chance of changing the thresholds that I can compare the
> run-time of the different multiplication algorithms for equal inputs.
> Thank you very much for your effort!
> Yours sincerely,
> David
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss

you need to recompile GMP:

1) go into gmp-6.1.0
2) after ./configure, edit the file gmp-mparam.h
3) change the Karatsuba threshold MUL_TOOM22_THRESHOLD
4) recompile and run "make check" to ensure all is fine

Paul


More information about the gmp-discuss mailing list