Sha256: 860ef1d522afe602b0cd4fcad377bd69daf2bb0e6b48cf9f0974d9e147efdc0a
Contents?: true
Size: 382 Bytes
Versions: 168
Compression:
Stored size: 382 Bytes
Contents
require 'rubygems' require 'tach' Tach.meter(10_000) do tach('merge') do default = { :a => 1, :b => 2 } override = { :b => 3, :c => 4 } override = default.merge(override) end tach('loop') do default = { :a => 1, :b => 2 } override = { :b => 3, :c => 4 } for key, value in default override[key] ||= default[key] end override end end
Version data entries
168 entries across 166 versions & 6 rubygems