Skip to content

Instantly share code, notes, and snippets.

@chrisseaton
Created March 5, 2015 20:39
Show Gist options
  • Save chrisseaton/9f7ed2a558275e5e02f8 to your computer and use it in GitHub Desktop.
Save chrisseaton/9f7ed2a558275e5e02f8 to your computer and use it in GitHub Desktop.
$ ~/.rbenv/versions/2.2.1/bin/ruby -I vendor/jruby/1.9/gems/benchmark-ips-2.1.0/lib mandelbrot.rb
Calculating -------------------------------------
while 2.000 i/100ms
loop 1.000 i/100ms
-------------------------------------------------
while 20.800 (± 4.8%) i/s - 624.000
loop 15.778 (± 6.3%) i/s - 473.000
Comparison:
while: 20.8 i/s
loop: 15.8 i/s - 1.32x slower
$ ~/.rbenv/versions/rbx-2.5.2/bin/ruby -I vendor/jruby/1.9/gems/benchmark-ips-2.1.0/lib mandelbrot.rb
Calculating -------------------------------------
while 4.000 i/100ms
loop 1.000 i/100ms
-------------------------------------------------
while 49.981 (± 4.0%) i/s - 1.496k
loop 18.485 (± 5.4%) i/s - 554.000
Comparison:
while: 50.0 i/s
loop: 18.5 i/s - 2.70x slower
$ ~/.rbenv/versions/jruby-1.7.18/bin/ruby -I vendor/jruby/1.9/gems/benchmark-ips-2.1.0/lib mandelbrot.rb
Calculating -------------------------------------
while 5.000 i/100ms
loop 2.000 i/100ms
-------------------------------------------------
while 58.013 (± 3.4%) i/s - 1.740k
loop 22.459 (± 4.5%) i/s - 674.000
Comparison:
while: 58.0 i/s
loop: 22.5 i/s - 2.58x slower
$ JAVACMD=../../../graal/graalvm-jdk1.8.0/bin/java ../../jruby/bin/jruby -X+T -I vendor/jruby/1.9/gems/benchmark-ips-2.1.0/lib mandelbrot.rb
Calculating -------------------------------------
while 72.000 i/100ms
loop 73.000 i/100ms
-------------------------------------------------
while 63.555k (±24.0%) i/s - 1.690M
loop 67.324k (±19.7%) i/s - 1.684M
Comparison:
loop: 67323.8 i/s
while: 63554.9 i/s - 1.06x slower
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment