Sha256: 0099286a9b2d94f59f4d4962e26bd3be01612bb01087c62fb6b1334b1b2ee753

Contents?: true

Size: 1.19 KB

Versions: 29

Compression:

Stored size: 1.19 KB

Contents

= ChunkyPNG benchmark suite

This small benchmark suite is intended to test the speed of PNG decoding 
and encoding against different ruby interpreters. You can set the number 
of runs by passing the N environment variable. You can execute them as
rake task or as standalone script.

    rake benchmark:encoding
    rake benchmark:decoding
    
    rake benchmark N=10           # Run all of them, using n=10

Use rvm to simply run the tests against different interpreters. Of course, 
make sure that the chunky_png is installed for all your interpreters.

    rvm 1.8.7,1.9.1,rbx rake benchmark N=10

== Results

Some of my benchmark (N=50) result on my 2007 iMac can be found in this gist:
http://gist.github.com/495323

== Why is this relevant?

ChunkyPNG is a pure Ruby library to handle PNG files. Decoding a PNG requires
a lot of integer math and bitwise operations, and moderate use of the unpack
method to read binary data. Encoding is a good test for Array#pack, and
depending on the encoding options, also requires a lot of calculations.
Therefore, the library is a good benchmark candidate for these methods and
algorithms. It has been used to improve the Array#pack and String#unpack
methods in Rubinius.

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
chunky_png-0.11.0 BENCHMARKS.rdoc
chunky_png-0.10.5 BENCHMARKS.rdoc
chunky_png-0.10.4 BENCHMARKS.rdoc
chunky_png-0.10.3 BENCHMARKS.rdoc
chunky_png-0.10.2 BENCHMARKS.rdoc
chunky_png-0.10.1 BENCHMARKS.rdoc
chunky_png-0.10.0 BENCHMARKS.rdoc
chunky_png-0.9.2 BENCHMARKS.rdoc
chunky_png-0.9.1 BENCHMARKS.rdoc