Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
require 'benchmark'
5.times do |i|
i = 10 ** i
h = Hash[ { |z| [z, z] }]
puts "N KEYS: #{i}"
puts do |x|'dup') { 1000.times { h.dup } }'Hash[]') { 1000.times { Hash[h] } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.