Created
February 16, 2012 23:06
-
-
Save aaronblohowiak/1848613 to your computer and use it in GitHub Desktop.
microbenchmarks are dumb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'tach' | |
Tach.meter(1_000_000) do | |
tach('double') do | |
"path" | |
end | |
tach('single') do | |
'path' | |
end | |
tach('double double toil and trouble') do | |
"path" | |
end | |
end | |
#~/ #>jruby tmp.rb | |
# | |
# [double, single, double double toil and trouble] | |
# | |
# +--------------------------------+----------+ | |
# | tach | total | | |
# +--------------------------------+----------+ | |
# | single | 3.442000 | | |
# +--------------------------------+----------+ | |
# | double double toil and trouble | 3.767000 | | |
# +--------------------------------+----------+ | |
# | double | 4.436000 | | |
# +--------------------------------+----------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jruby??