Sha256: b3becda11c44c163313c0a048b51494f02dc69f481cb6eda4b546d5416a26135

Contents?: true

Size: 274 Bytes

Versions: 10

Compression:

Stored size: 274 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?', %{ array.empty? }
  x.report 'Array#blank?', %{ 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.rb
benchmark_driver-0.8.5 examples/exec_blank.rb
benchmark_driver-0.8.4 examples/exec_blank.rb
benchmark_driver-0.8.3 examples/exec_blank.rb
benchmark_driver-0.8.2 examples/exec_blank.rb
benchmark_driver-0.8.1 examples/exec_blank.rb
benchmark_driver-0.8.0 examples/exec_blank.rb
benchmark_driver-0.7.2 examples/exec_blank.rb
benchmark_driver-0.7.1 examples/exec_blank.rb
benchmark_driver-0.7.0 examples/exec_blank.rb