ruby--ruby/benchmark/array_values_at_range.rb

3 lines
71 B
Ruby

ary = Array.new(10000) {|i| i}
100000.times { ary.values_at(1..2000) }