Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
require "rubygems"
require "rbench"
RBench.run(1_000_000) do
column :time
report "block" do
times {[1,2,3,4,5].map {|v| v.to_s}}
end
report "symbol2proc" do
times {[1,2,3,4,5].map(&:to_s)}
end
end
# Results on 1.9.2:
# TIME |
# -----------------------------
# block 0.234 |
# symbol2proc 0.195 |
#
# Results on 1.8.7
#
# TIME |
# -----------------------------
# block 0.240 |
# symbol2proc 0.238 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.