ruby--ruby/benchmark/array_sample_100k_10.rb

3 lines
49 B
Ruby

arr = [*0...100000]
10_000.times {arr.sample 10}