[hashcash] Re: 1.10 benchmark

  • From: Adam Back <adam@xxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Sat, 2 Oct 2004 05:52:09 -0400

Doing a fast relatively accurate prediction is a bit of an art.  So
variance and accuracy depends on CPU speed and timer accuracy.  Timer
accuracy is affected by OS context switches.  Unfortunately the timer
resolution on i386 linux is 1/100th sec which is rather low resolution
to achieve an accurate timing within 1/10th sec or something fast.

If you want to see what is really the speed "hashcash -sv" takes
longer and gets more accurate results.

(There is a fast CPU timer on pentiums but that is a) pentium specific
(486 doesn't have); b) does not take account of other load (it is
elapsed time); and c) is in clock ticks rather than time, and there is
no convenient way to convert clock ticks to time (eg read bogomips
from /proc/cpuinfo?)).

So the current status quo is relatively fast (1/10th s elapsed)
not-that-accurate timing and estimates from "hashcash -s".  And slow
but quite accurate with "hashcash -sv"

Adam

On Fri, Oct 01, 2004 at 10:55:14PM -0400, Atom 'Smasher' wrote:
> i'm not getting nearly as much variation, in my estimates:
> 
> $ for ((i=0; $i < 15; i++)); do hashcash -sb30; done
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 448 seconds (7 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> time estimate: 464 seconds (8 minutes)
> 
> 
>         ...atom
> 
>  _________________________________________
>  PGP key - http://atom.smasher.org/pgp.txt
>  762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
>  -------------------------------------------------
> 
>       "Anyone who doubts that terrorists could smuggle a
>        nuclear warhead into New York City should note that
>        they could always wrap it in a bale of marijuana."
>               -- Graham Allison, The Boston Globe 27 October 1999
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.3.6 (FreeBSD)
> Comment: What is this gibberish?
> Comment: http://atom.smasher.org/links/#digital_signatures
> 
> iQEcBAEBCAAGBQJBXhiXAAoJEAx/d+cTpVciUyIH/jtY7i20PjTglfhjiVFU0//C
> 1DvPRoltmA4qiRMp0fsu8T5I4lWaLuIlhqGJ5YTZS6OsT0XhGv95KPz5kseLJyNF
> C4PBVSxqFgNvmCmkfOO9PDSxdJQolAHpAnriXKEwx9IfvZe3Fnu4ryu++w2nmeTJ
> wEGU4ROT8RPAuz7Bdon7uVmjqLTTPHyZYw98WNEXV6sAE4pJhumLaoTUYc0N6jB8
> ALPXsetZwnxsm2D5GoayAfoKjD4iWngutzxNQ/u36B4iEw8uguz0mtWQ1cVc60ok
> AAGv3xbsCb5yfNJXObsc07CbbjoKenQ0wajSTg2STAsEslWcCAMNMlimK49g/fY=
> =eKJT
> -----END PGP SIGNATURE-----

Other related posts: