Sha256: 7cdb2ddb7eb3061099c91f30e82989a4bc6e5e98a2e78e33480e47fd11680f9a
Contents?: true
Size: 296 Bytes
Versions: 60
Compression:
Stored size: 296 Bytes
Contents
require 'benchmark' TEST_AMOUNT = 1_000_000 Benchmark.bm(15) do |x| x.report('empty_array') do empty_array = [] TEST_AMOUNT.times do empty_array.each{|e|} end end x.report('proc call') do block = proc {} TEST_AMOUNT.times do block.call end end end
Version data entries
60 entries across 60 versions & 2 rubygems