[hashcash] Re: cpu detection, disabling mmx code on non mmx cpu (Re: Re: status of hashcash version 1?)

  • From: Jonathan Morton <chromi@xxxxxxxxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Thu, 5 Aug 2004 17:04:16 +0100

CPU Info I was getting 1.25 MegaSHA1/sec using only ANSI-C:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : AMD Athlon(tm) XP 1700+
stepping        : 2
cpu MHz         : 1460.471
cache size      : 256 KB

I'm getting 2 MegaSHA1/sec using three different ANSI C cores on a 1600MHz Athlon-XP, and 3 MegaSHA1/sec using the MMX version. This is when optimised for a Pentium-MMX, not an Athlon. A 3.06GHz P4 has been reported as breaking 4 MegaSHA1/sec. We don't yet have figures for a K8 class chip.


On a 667MHz G4, I'm getting up to 1.2 MegaSHA1/sec using an ANSI C core (if the compiler options are very carefully controlled), and 3 MegaSHA1/sec using Altivec. Extrapolating, a 2.0 GHz G5 might conceivably reach 9 or more, assuming everything remains single-threaded.

Performance isn't really a concern any more - what we need is stability and out-of-the-box compatibility with old chips. I've thought up a good way to handle the latter (simply catch the SIGILL that CPUID might trigger), so if the Debian folks would like to just make an i586 package for now, I'll come forward with an i386-compatible version in a while.

Right now I'm also working on getting the minter to actually work with my code integrated. The first step is to make it compile within my preferred devel environment. Until that happens, the Debian folks should prepare a package *without* my code integrated. It'll be slower, but slow is better than non-functional. If that means the fast code gets bumped to the unstable tree due to missing the deadline, so be it.

--------------------------------------------------------------
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: