[hashcash] Re: Hashcash performance improvements

  • From: Jonathan Morton <chromi@xxxxxxxxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Fri, 28 May 2004 01:42:31 +0100

> For single-user operations, most machines capable of multiple threads
> have CPUs which are also capable of more generic optimisations
> (particularly vectorisation and/or multi-piping), which I reckon have a
> bigger payoff.
In this vein, here's the first batch of low-level optimised minters.  
The following numbers are from my TiBook, with a 667MHz PPC7450.

GCC:
     Rate  Name (* machine default)
    676403 ANSI Compact 1-pipe
   1236928 ANSI Standard 1-pipe *
    767537 ANSI Compact 2-pipe
    401641 ANSI Standard 2-pipe
   2416101 PowerPC Altivec Standard 1x4-pipe
Best minter: PowerPC Altivec Standard 1x4-pipe (2416101 hashes/sec)

CodeWarrior:
     Rate  Name (* machine default)
    677140 ANSI Compact 1-pipe
   1031458 ANSI Standard 1-pipe *
    786993 ANSI Compact 2-pipe
    570715 ANSI Standard 2-pipe
   2534441 PowerPC Altivec Standard 1x4-pipe
Best minter: PowerPC Altivec Standard 1x4-pipe (2534441 hashes/sec)

The 2-pipe scalar minters don't seem to work too well - it seems that 
even the mighty PowerPC doesn't have as many registers to play with as 
the compiler would like.  Or maybe the function is simply too big for 
it to keep track of.

However, they seem to have equal speed to the Compact 1-pipe (the best 
to date) on my Athlon, so I've left them in on the off-chance that 
another machine and/or compiler will do better.  I'm also downloading 
an updated version of XCode, since my copy of GCC is about a year out 
of date.

I wonder what Adam's P4 will make of the piped minters?

The vectorised code is pretty nice, don't you think?  :)  I suspect 
there's room for a second 4-way pipe in the Altivec register file, so I 
might write one in later.

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



-- Binary/unsupported file stripped by Ecartis --
-- Type: application/zip
-- File: libfastmint.zip



Other related posts: