-
-
Save vipulnsward/fa70dec670187713bfd8 to your computer and use it in GitHub Desktop.
changing merge to merge!
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 "benchmark" | |
N = 1_00_00_000 | |
Benchmark.bmbm do |x| | |
x.report("Indifferent Access") do | |
N.times do |i| | |
HashWithIndifferentAccess.new(i) | |
end | |
end | |
end | |
=begin | |
With merge | |
Rehearsal ------------------------------------------------------ | |
Indifferent Access 9.570000 0.380000 9.950000 ( 9.945525) | |
--------------------------------------------- total: 9.950000sec | |
user system total real | |
Indifferent Access 9.580000 0.370000 9.950000 ( 9.939738) | |
With merge! | |
Rehearsal ------------------------------------------------------ | |
Indifferent Access 7.950000 0.610000 8.560000 ( 8.599360) | |
--------------------------------------------- total: 8.560000sec | |
user system total real | |
Indifferent Access 7.960000 0.590000 8.550000 ( 8.553272) | |
=end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment