Discrepancy in measuring performance?

William E. Skeith III wes_zilla at yahoo.com
Mon Apr 2 21:38:31 CEST 2012


Some guesses:

> 1. Your mp_bits_per_limb is 32 when it should be 64.
>   This could be caused by picking up the wrong gmp.h.
> 

I had my test code print out mp_bits_per_limb, which reported 64.  Is
this conclusive?  Or is it possible that it's wrong?

> 2. You're using the kernel Linux and your system is loaded without you
>   noticing.  This kernel doesn't virtualise TSC, making cycles taken by
>   any other process spill into you process' TSC reads.  (To my
>   knowledge, all BSD kernels and Solaris gets this right.)

Not sure I follow, probably because I'm a linux newbie.  Here is a
little more information:   I was running the tests on Arch linux, on a
freshly booted machine.  I ran the tests from the linux terminal; I
didn't start a window manager, or X, or even the network.  If I ran ps
aux, I would see a long list of 0.0 in the CPU column.  I'm pretty
naive, so this may not be right, but I didn't think ps aux was hiding
much from me.  So is it possible that a lot of work was happening in
spite of this?  Also, I ran src/tune/speed back to back with my test
code, and had the (nice!) results every time.  Is there some trickery in
/src/tune/speed that would make it less susceptible to interrupts and
such?  I spent a little time drifting through the source, but I couldn't
follow everything.

> 
> 3. You're linking to an outdated version of GMP for you own tests (as
>   opposed to the tests with the 'speed' program.
>

I installed GMP myself, so the system wide /usr/lib/gmp* libraries are
the ones I compiled.  I checked the SHA1's from /usr/lib/ vs. those in
src/.libs/ and they are not the same, but I think this is because the
packager has stripped some things out.  The ones in /usr/lib are
slightly smaller, and the timestamps are a few minutes later (after
make, the tests took some time to run, and only after that were the
libraries installed... or so I think, anyway).  Could something have
gone wrong there??  I can try to repackage, or just copy the libraries
directly and try again.


Thanks so much for your time!!

-WES


More information about the gmp-discuss mailing list