Skip to content

Instantly share code, notes, and snippets.

@adaedra
Created October 14, 2012 11:34
Show Gist options
  • Save adaedra/3888306 to your computer and use it in GitHub Desktop.
Save adaedra/3888306 to your computer and use it in GitHub Desktop.
Ruby implementations comparison
adaedra@pegasus % ./test.rb
Test "sinusTest" runned in 1.340s
Test "loopTest" runned in 6.249s
Test "arrayTest" runned in 1.810s
Test "randomTest" runned in 3.110s
Test "sortTest" runned in 1.774s
Test "threadsTest" runned in 5.762s
Total time run : 20.045s
adaedra@pegasus % rvm use jruby
Using /usr/local/rvm/gems/jruby-1.6.8
adaedra@pegasus % ./test.rb
Test "sinusTest" runned in 0.654s
Test "loopTest" runned in 2.944s
Test "arrayTest" runned in 1.468s
Test "randomTest" runned in 0.398s
Test "sortTest" runned in 0.634s
Test "threadsTest" runned in 1.691s
Total time run : 7.789s
adaedra@pegasus % rvm use rbx
Using /usr/local/rvm/gems/rbx-head
adaedra@pegasus % ./test.rb
Test "sinusTest" runned in 1.074s
Test "loopTest" runned in 1.945s
Test "arrayTest" runned in 2.713s
Test "randomTest" runned in 0.618s
Test "sortTest" runned in 5.982s
Test "threadsTest" runned in 0.663s
Total time run : 12.994s
adaedra@pegasus %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment