GMP on Pentium 2

Patrick Pelissier Patrick.Pelissier at
Tue Oct 21 13:26:27 CEST 2003

I think I have found a strange thing in GMP for Pentium 2 (and maybe 
also P3).

I have built GMP 4.1.2 with gcc 3.2.1 with host=athlon and 
host=pentium2, and I build speed program in both case (speed-at and 

I test both programs on Pentium2, with :
speed-at -s SIZE -C mpn_add_n

Here are the results (with some antialiasing since speed programs is not 
very precise):

SIZE  | speed-p2 | speed-at
500   | 3.80     | 2.81
5000  | 8.4740   | 8.54
50000 | 14.80    | 15
500000| 21.6     | 21.5

It seems that GMP for Athlon is faster in low and huge precision (due to 
overhead and cache, I think).

Of course, the results are not sure. This is just for information.

  Patrick Pelissier

More information about the gmp-discuss mailing list