Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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.188000 0.000000 0.188000 ( 0.188000)
0.160000 0.000000 0.160000 ( 0.160000)
0.159000 0.000000 0.159000 ( 0.159000)
0.156000 0.000000 0.156000 ( 0.156000)
0.155000 0.000000 0.155000 ( 0.155000)
system ~/projects/jruby $ ../rubinius/bin/rbx -rbenchmark -e "def foo(x); end; 5.times { puts Benchmark.measure { 1_000_000.times { foo([:a, 1, :b, 2, :c, 3]) } } }"
0.203830 0.001165 0.204995 ( 0.220599)
0.188541 0.000217 0.188758 ( 0.200818)
0.151579 0.000183 0.151762 ( 0.151932)
0.149035 0.000107 0.149142 ( 0.149194)
0.148555 0.000174 0.148729 ( 0.148862)
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.290000 0.000000 0.290000 ( 0.285458)
0.270000 0.000000 0.270000 ( 0.280291)
0.280000 0.000000 0.280000 ( 0.279900)
0.280000 0.000000 0.280000 ( 0.278208)
0.280000 0.000000 0.280000 ( 0.280501)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment