[hashcash] Re: benchmark

  • From: Jonathan Morton <chromi@xxxxxxxxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Wed, 15 Sep 2004 17:54:24 +0100

I get that, too, when I let gentoo compile hashcash.  It ends up
building with these flags:

-O3 -march=pentium3 -pipe -fomit-frame-pointer -O3    -c

it works fine with the default flags for "make x86", namely

-DREGEXP_POSIX -O3 -funroll-loops -march=i386 -mcpu=pentium -mmmx
-D_REENTRANT -D_THREAD_SAFE -fPIC    -c

hhmmm... my build is with different flags (on freeBSD)...

It seems that it's -march=pentium3 that's triggering the bug.

Using those exact flags (-march=i386 and -S instead of -c), attachment 1
is the assembly code gcc generates.

I think it's a bug (to do with aliasing rules) in GCC. I've put in a workaround (a dummy assembler block that forces reloading of the MMX registers) at my end, and I'm just running some tests before sending an updated patch. The same bug notably fails to show up on PowerPC.


I've also fixed other reported bugs and included some more optimisations - people should see a few more percent speed using most cores, and the real minter now counts in one of the optimal positions. The real minter now also uses a fixed-size 16-char random field, rather than using it as padding.

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@xxxxxxxxxxxxxxxxxxxxx
website:  http://www.chromatix.uklinux.net/
tagline:  The key to knowledge is not to rely on people to teach you it.


Other related posts: