-----BEGIN PGP SIGNED MESSAGE-----

Moin,

On Sunday 22 August 2004 13:58, Tels wrote:
>  "Und jetzt kommen Sie!" - Stenkelfeld
>
>
> - -Boundary-00=_4qIKBAMkjo+ZGFc
> Content-Type: application/x-perl;

Ugh, seems the gnupg signing screwed up the mime containers or something 
like that: I apologize for the garbled post. 

Here is the text again:

Moin,

this is something that I had a long time sitting on my harddisk. I uploaded 
v0.10 to

        http://bloodgate.com/perl/packages/BigBench-0.10.tar.gz

This is a small script that makes benchmarking different module or even Perl 
versions against eachother much easier.

BigBench v0.10  (c) Copyright by Tels 2001-2002.  Have fun!

 Usage  : ./bb [options]
 Options: --help              print this screen and exit
          --accuracy=digits   round results to so many digits
          --base=number       print relative summary based on number
          --code=sourcecode   bench code snippet and ignore definitions
          --definitons=file   from where to read benchmark definitions
          --duration=seconds  run each op for at least this time
          --nosummary         don't print summary
          --nointeger         don't round results to integer
          --nounlink          don't unlink temporary files (for debug)
          --path=libpath      path to libraries used by templates
          --runs=number       run benchmark more than once (see --take)
          --simulate=sr       simulate results by using srand(sr)
          --skew=factor       scale reported numbers by factor
          --take=run          take lowest|average|highest|last
          --templates=path    path to templates to be used
          --terse             terse summary (unless --nosummary)
          --tight             more tight summary (smaller spacing)

 Options may be abbreviated, their case does not matter.

 Examples: ./bb --def=math.def --terse --skew=2.1       # better printable?
           ./bb --def=str.def --inc=math --duration=5   # really 
fine-grained
           ./bb --def=some.def --nosummary              # detailed
           ./bb --def=some.def --terse --base=100       # simulate perlbench
           ./bb --code='"ababba" =~ /a+/;'              # only this
           ./bb --runs=2 --take=last                    # cache, then bench

Here is an excerpt from a definition file, specifiying four ops to 
benchmark:

 group=bcmp#0#Big integer bcmp
 0#1 1#$x=$c->new('1');$y=$x->copy();##$x->bcmp($y);
 0#1e10 1e10#$x=$c->new('1'x10);$y=$x->copy();##$x->bcmp($y);
 group=bsqrt#0#Big integer square root
 0#5#$x=$c->new('5');#$x->copy();#$x->copy()->bsqrt();
 0#12#$x=$c->new('12');#$x->copy();#$x->copy()->bsqrt();

The latter two benchmark the copy() seperately from the copy()->bsqrt() to 
determine how much the bsqrt() takes alone. The copy() is neccessary to 
always bench the same bsqrt() operations (it would change $x otherwise).

I also attached two template files that do the actual benchmarking. First 
they make sure that the proper modules are loaded, then setup the opration 
(notable "$c" because our definition file will use this).

Of course, you can also just benchmark any code snippet:

        ./bb --code='$a =~ /abc/'

The biggst TODO is currently that it generates the benchmark and then 
displays the result from that in one step. This should be separated so that 
you can generate different outputs without the need to re-run the time 
consuming benchmarks.

If there is sufficient interest, I'll work on that.

I've found that benchmarking different module versions automatically on a 
wide range of ops enablesme to discover bugs - if something is suddenly 2 
times as slow than some subtle change broke something :)

Best wishes,

Tels

- -- 
 Signed on Sun Aug 22 14:04:08 2004 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "We have problems like this all of the time," Kirk said, trying to
 reassure me.  "Sometimes its really hard to get things burning." --
 http://tinyurl.com/qmg5

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.

iQEVAwUBQSiMRXcLPEOTuEwVAQFpdAf/VIdrPKBsS1Lqf+tNzN50+q0tUM7/1mps
YyMmM6PqWhigZ90JLGcDZDvATOoAGkWCxVFVtsLvjBLoabHs10A5Jls5MsEOvgLh
4UGDMtRbfkhUJfI8KNHZgk7LIrZ8QvwmY/MiRWi3S2C+WBeu3rAtnTx65wZuuM5A
GjEK3Woo4vdvQbcaVOKLpdvgQbvxKLi+PwnvxXdZNkB8zwDVnOTkICTv2fOzlWLc
CiEa2N66GS5YGUZ5pnIlFCKtD3hI3Dd6XZLVSc+tjONw0qDG5Z8eOq4In9lF9GmS
RE9zzx5gc5x6Wtow7VkxKC1+Vd7UXxBMc3g8si2SPb5mOpV2lzylUw==
=l9Xr
-----END PGP SIGNATURE-----

Reply via email to