Created
August 2, 2008 13:01
-
-
Save anonymous/3733 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
"1.8.6" | |
"2008-03-03" | |
user system total real | |
block 35.650000 0.050000 35.700000 ( 35.717756) | |
symbol106.290000 3.940000 110.230000 (111.735975) | |
--8<---- | |
"1.9.0" | |
"2007-12-25" | |
user system total real | |
block 13.210000 0.000000 13.210000 ( 13.221047) | |
symbol 11.060000 0.020000 11.080000 ( 11.099965) |
This file contains hidden or 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
"1.8.6" | |
"2008-03-03" | |
user system total real | |
block 35.230000 0.020000 35.250000 ( 35.282963) | |
symbol 99.980000 0.120000 100.100000 (100.431351) | |
--8<---- | |
"1.9.0" | |
"2007-12-25" | |
user system total real | |
block 12.640000 0.010000 12.650000 ( 12.671435) | |
symbol 11.100000 0.000000 11.100000 ( 11.101745) | |
This file contains hidden or 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' and require 'activesupport' if RUBY_VERSION == "1.8.6" | |
p RUBY_VERSION | |
p RUBY_RELEASE_DATE | |
require "benchmark" | |
SIZE = 1_000 | |
TIMES = 10_000 | |
RANGE = (1..SIZE) | |
print " " | |
Benchmark.bm do |bm| | |
bm.report " block" do | |
TIMES.times do | |
RANGE.map { |n| n.to_s } | |
end | |
end | |
bm.report "symbol" do | |
TIMES.times do | |
RANGE.map &:to_s | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment