Sha256: 4b363e60737643c0413521f437f830b30de42a9a4b34a2c842d5678cc95f3e19

Contents?: true

Size: 1.19 KB

Versions: 8

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

8 entries across 7 versions & 3 rubygems

Version Path
bench9000-0.1 vendor/chunky_png/BENCHMARKS.rdoc
chunky_png-1.3.2 BENCHMARKS.rdoc
chunky_png-1.3.1 BENCHMARKS.rdoc
sadui-0.0.4 vendor/bundle/ruby/2.0.0/gems/chunky_png-1.3.0/BENCHMARKS.rdoc
sadui-0.0.4 vendor/bundle/ruby/2.1.0/gems/chunky_png-1.3.0/BENCHMARKS.rdoc
chunky_png-1.3.0 BENCHMARKS.rdoc
chunky_png-1.2.9 BENCHMARKS.rdoc
chunky_png-1.2.8 BENCHMARKS.rdoc