I've ported GMP to Mac Pro. GMPbench > 7700
Torbjorn Granlund
tege at swox.com
Sat Oct 14 16:18:48 CEST 2006
"Jason Worth Martin" <martinjw at jmu.edu> writes:
I've ported GMP to the Mac Pro (and it passes "make check"). I
thought you might be interested since I saw some archived posts on
the poor Core 2 results. I re-wrote add_n.asm and sub_n.asm and got a
nice speed up by unrolling the loop and getting rid of the "inc"
instruction. I've attached a tarball with the relevant files and
details.
I've made some experiments too, using the forgotten instruction jrcxz:
beginloop:
jrcxz exitloop
lea -1(%rcx), %rcx
add...
jmp beginloop
I believe that this code could be ported to Core 2 Linux machines, but
the GNU assembler doesn't want to let me use the "sahf" and "lahf"
instructions to save the flags between loop iterations. The Apple
assembler doesn't have a problem with it. I'll see about replacing
those instructions with a combitation of "bt" and "test" for a Linux
version.
What sort of performance, as measured by tune/speed do you get for
your new functions?
--
Torbjörn
More information about the gmp-devel
mailing list