ruby--ruby/benchmark/array_sample.yml

5 lines
76 B
YAML

prelude: ary = (1..10_000).to_a
benchmark:
- ary.sample
- ary.sample(2)