diff --git a/benchmark/bm_array_values_at_int.rb b/benchmark/bm_array_values_at_int.rb new file mode 100644 index 0000000000..6cb394cb9f --- /dev/null +++ b/benchmark/bm_array_values_at_int.rb @@ -0,0 +1,2 @@ +ary = Array.new(10000) {|i| i} +100000.times { ary.values_at(500) } diff --git a/benchmark/bm_array_values_at_range.rb b/benchmark/bm_array_values_at_range.rb new file mode 100644 index 0000000000..5b53806d1c --- /dev/null +++ b/benchmark/bm_array_values_at_range.rb @@ -0,0 +1,2 @@ +ary = Array.new(10000) {|i| i} +100000.times { ary.values_at(1..2000) }