Sha256: aee0402bfaaf366b9d5a87e5458c5d2813cc09359f11b751a57fffb42f1d17e5

Contents?: true

Size: 242 Bytes

Versions: 10

Compression:

Stored size: 242 Bytes

Contents

require 'benchmark/driver'

Benchmark.driver(runner: :exec) do |x|
  x.prelude <<-EOS
    class Array
      alias_method :blank?, :empty?
    end
    array = []
  EOS
  x.report %{ array.empty? }
  x.report %{ array.blank? }
  x.compare!
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
benchmark_driver-0.8.6 examples/exec_blank_simple.rb
benchmark_driver-0.8.5 examples/exec_blank_simple.rb
benchmark_driver-0.8.4 examples/exec_blank_simple.rb
benchmark_driver-0.8.3 examples/exec_blank_simple.rb
benchmark_driver-0.8.2 examples/exec_blank_simple.rb
benchmark_driver-0.8.1 examples/exec_blank_simple.rb
benchmark_driver-0.8.0 examples/exec_blank_simple.rb
benchmark_driver-0.7.2 examples/exec_blank_simple.rb
benchmark_driver-0.7.1 examples/exec_blank_simple.rb
benchmark_driver-0.7.0 examples/exec_blank_simple.rb