add benchmark suite

This commit is contained in:
Watson
2013-11-16 09:16:58 +09:00
parent d594397510
commit a749bfc648
25 changed files with 1074 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
$large_array = (1..1000).to_a
def bm_array
Benchmark.benchmark("", 30, "%r\n") do |x|
array_at(x)
array_concat(x)
array_dup(x)
array_each(x)
array_flatten(x)
array_map(x)
array_reject(x)
array_reverse(x)
array_rotate(x)
array_sample(x)
array_select(x)
array_slice(x)
array_sort(x)
array_uniq(x)
end
end