Re: benchmark

Jonathan Morton <[email protected]>
Newsgroups gmane.mail.spam.hashcash
Message-ID <[email protected]>
>>> 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:     [email protected]
website:  http://www.chromatix.uklinux.net/
tagline:  The key to knowledge is not to rely on people to teach you it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.