ruby--ruby/benchmark/array_values_at_int.rb

3 lines
67 B
Ruby

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