Is there a platform optimized version of gmp for INTEL?

Décio Luiz Gazzoni Filho decio at
Tue Jan 2 02:04:26 CET 2007

Hash: SHA1

On Jan 1, 2007, at 8:13 PM, Michael wrote:

> Does anybody have a statistic about how much performance is gained  
> by using Intel Compiler and Intel tools, than MSVS 2005?

Maybe 2 or 3%. If you got 5% I'd be absolutely astonished.

> Also if I pay big bucks and hire some experts to rewrite some  
> portions of the GMP and MPFR (only a small portion that is related  
> to my project, to make the whole thing manageable) in a Intel  
> platform optimized Assembly language. Will that improve speed a lot?

Depends on what part you need to be faster. If your bottleneck is the  
multiprecision addition code, forget it. If your bottleneck is  
multiplication with huge arguments (say hundreds of millions or  
larger), then hiring someone to write a faster FFT (or an NTT, at  
that size) would bring about some large gains. If your bottleneck is  
the division code, or some of the other code that could be using  
Newton methods along with subquadratic multiplication, then the  
improvements could be huge. But unless you specify what specific  
operation is your bottleneck, then it's impossible to give an answer.  
Different parts of GMP are at different levels of optimization.

Now one thing has been asked, but you dodged the question: have you  
ruled out all possibilities of algorithmic optimization? Low-level  
optimization can only get you so far, and usually not as far as  
algorithmic optimization will. You could write the best grammar- 
school multiply code possible, but in the millions of digits range it  
would take a severe beating from even the most simple-minded and  
badly written FFT possible. And even if you're done with algorithmic  
optimization, have you profiled your code to find the true  
bottlenecks and where to focus your efforts on?

If at all possible, please shed some light on what you're trying to  
do. You appear biased towards low-level optimization, but others  
could help point out better strategies, if they only knew what it is  
you're trying to accomplish.

Version: GnuPG v1.4.5 (Darwin)


More information about the gmp-discuss mailing list