Skip to content

Instantly share code, notes, and snippets.

@headius
Created October 25, 2011 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/a07c93c80dfdea023253 to your computer and use it in GitHub Desktop.
Save headius/a07c93c80dfdea023253 to your computer and use it in GitHub Desktop.
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