Skip to content

Instantly share code, notes, and snippets.

@headius
Created October 25, 2011 13:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/1312815 to your computer and use it in GitHub Desktop.
Save headius/1312815 to your computer and use it in GitHub Desktop.
system ~/projects/jruby $ jruby --1.9 -rbenchmark -e "def foo(x, y, z); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo(1, 2, 3) } } }"
0.117000 0.000000 0.117000 ( 0.117000)
0.092000 0.000000 0.092000 ( 0.092000)
0.089000 0.000000 0.089000 ( 0.089000)
0.090000 0.000000 0.090000 ( 0.090000)
0.089000 0.000000 0.089000 ( 0.089000)
system ~/projects/jruby $ jruby --1.9 -rbenchmark -e "def foo(x); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo(a: 1, b: 2, c: 3) } } }"
0.385000 0.000000 0.385000 ( 0.385000)
0.357000 0.000000 0.357000 ( 0.357000)
0.356000 0.000000 0.356000 ( 0.356000)
0.359000 0.000000 0.359000 ( 0.359000)
0.357000 0.000000 0.357000 ( 0.357000)
system ~/projects/jruby $ ../rubinius/bin/rbx -X19 -rbenchmark -e "def foo(x, y, z); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo(1, 2, 3) } } }"
0.091871 0.000122 0.091993 ( 0.091956)
0.088323 0.000084 0.088407 ( 0.088450)
0.051021 0.000057 0.051078 ( 0.051119)
0.051546 0.000046 0.051592 ( 0.051661)
0.051367 0.000053 0.051420 ( 0.051469)
system ~/projects/jruby $ ../rubinius/bin/rbx -X19 -rbenchmark -e "def foo(x); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo(a: 1, b: 2, c: 3) } } }"
3.542277 0.004229 3.546506 ( 3.718833)
3.474583 0.003239 3.477822 ( 3.482817)
3.372332 0.002507 3.374839 ( 3.375808)
3.373219 0.005194 3.378413 ( 3.379742)
3.371294 0.002565 3.373859 ( 3.374732)
system ~/projects/jruby $ ruby1.9.2 -rbenchmark -e "def foo(x, y, z); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo(1, 2, 3) } } }"
0.090000 0.000000 0.090000 ( 0.088163)
0.090000 0.000000 0.090000 ( 0.089318)
0.090000 0.000000 0.090000 ( 0.088605)
0.090000 0.000000 0.090000 ( 0.089340)
0.090000 0.000000 0.090000 ( 0.089076)
system ~/projects/jruby $ ruby1.9.2 -rbenchmark -e "def foo(x); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo(a: 1, b: 2, c: 3) } } }"
0.970000 0.020000 0.990000 ( 0.991608)
0.960000 0.020000 0.980000 ( 0.987144)
0.970000 0.030000 1.000000 ( 0.982493)
0.970000 0.020000 0.990000 ( 0.992827)
0.960000 0.020000 0.980000 ( 0.989362)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment