ruby/benchmark/range_count.yml

12 строки
181 B
YAML

prelude: |
r_1 = 1..1
r_1k = 1..1000
r_1m = 1..1000000
r_str = 'a'..'z'
benchmark:
'int 1': r_1.count
'int 1K': r_1k.count
'int 1M': r_1m.count
string: r_str.count