GMP 4.3 multiplication performance

Peter Cordes peter at
Sat Jun 6 17:50:40 CEST 2009

On Wed, Jun 03, 2009 at 12:09:21PM +0200, Torbjorn Granlund wrote:
> This particular macro is not currently problem free.  Let's compare
> lshift+add_n and submul_1 on some machines:
>              lshift+sub_n            submul_1
> athlon64        3.87                     2.5
> core2           3.3                      4.5
> pentium4/64     7.3                     14.9
> ultrasparc 3    7.75                    23
> power4/ppc970   5.0                     10

 Have you incorporated my mpn_rshift improvements for Core2?  (and
sped up lshift the same way?)  I haven't really been paying attention
since I've been busy with other stuff.  I was going to put some
finishing touches on the setup code, but I never got back to it since
I got busy with other projects...

#define X(x,y) x##y
Peter Cordes ;  e-mail: X(peter at cor ,

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BC

More information about the gmp-devel mailing list