Sha256: 7b61ef14783ff1d776d45e558b3daa653ac7f2887d9e596671559d42af398902

Contents?: true

Size: 255 Bytes

Versions: 8

Compression:

Stored size: 255 Bytes

Contents

require 'benchmark_driver'

Benchmark.driver(output: :simple) do |x|
  x.prelude <<-EOS
    class Array
      alias_method :blank?, :empty?
    end
    array = []
  EOS
  x.report %{ array.empty? }
  x.report %{ array.blank? }
  x.loop_count 10000000
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
benchmark_driver-0.10.16 examples/exec_blank_simple.rb
benchmark_driver-0.10.15 examples/exec_blank_simple.rb
benchmark_driver-0.10.14 examples/exec_blank_simple.rb
benchmark_driver-0.10.13 examples/exec_blank_simple.rb
benchmark_driver-0.10.12 examples/exec_blank_simple.rb
benchmark_driver-0.10.11 examples/exec_blank_simple.rb
benchmark_driver-0.10.10 examples/exec_blank_simple.rb
benchmark_driver-0.10.9 examples/exec_blank_simple.rb