ruby/benchmark/hash_dup.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 строки
195 B
YAML
Исходник Обычный вид История

2019-10-21 11:29:21 +03:00
prelude: |
small_hash = { a: 1 }
larger_hash = 20.times.map { |i| [('a'.ord + i).chr.to_sym, i] }.to_h
benchmark:
dup_small: small_hash.dup
dup_larger: larger_hash.dup
loop_count: 10000