summaryrefslogtreecommitdiff
path: root/benchmark/bm_array_shift.rb
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/bm_array_shift.rb')
-rw-r--r--benchmark/bm_array_shift.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/benchmark/bm_array_shift.rb b/benchmark/bm_array_shift.rb
deleted file mode 100644
index 798bb9e..0000000
--- a/benchmark/bm_array_shift.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-require 'benchmark'
-
-Benchmark.bm do |x|
- [10_000,1_000_000,100_000_000].each do |n|
- ary = Array.new(n,0)
- GC.start
- x.report("#{n}:shift"){ ary.shift }
- (0..4).each do |i|
- ary = Array.new(n,0)
- GC.start
- x.report("#{n}:shift(#{i})"){ ary.shift(i) }
- end
- end
-end