"Core 2" GMPbench results
Torbjorn Granlund
tg at swox.com
Tue Aug 22 18:34:55 CEST 2006
I've had the opportunity to test GMP 4.2.1 on a new "Core 2" processor
and also run GMPbench on it. While the machine is very zippy when
compiling things, GMPbench results are not all that great as one might
had expected from the raving reviews of this processor. Some GMP
timing results are actually truly terrible.
GMPbench results are here: http://swox.com/gmp/gmpbench.html
One clear reason for the results is that the current mpn_add_n and
mpn_sub_n loops run terribly, at 13.5 cycles/limb. The multiply loops
(mpn_addmul_1 and friends) run much faster, at between 4.5 and 7
cycles/limb, oddly enough.
This is the loop of mpn_add_n, which to my eye looks very innocent:
.Loop: movq (%rsi,%rcx,8), %rax
movq (%rdx,%rcx,8), %r10
adcq %r10, %rax
movq %rax, (%rdi,%rcx,8)
incq %rcx
jne .Loop
--
Torbjörn
More information about the gmp-discuss
mailing list