Sha256: 30080f5de6517fddf95a03db34a54f695be0aa14bc714c1e839adc95f0d1c6a6

Contents?: true

Size: 257 Bytes

Versions: 9

Compression:

Stored size: 257 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(script: 'array.empty?')
  x.report(script: 'array.blank?')
  x.compare!
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
benchmark_driver-0.6.2 examples/exec_blank.rb
benchmark_driver-0.5.1 examples/exec_blank.rb
benchmark_driver-0.5.0 examples/exec_blank.rb
benchmark_driver-0.4.5 examples/exec_blank.rb
benchmark_driver-0.4.4 examples/exec_blank.rb
benchmark_driver-0.4.3 examples/exec_blank.rb
benchmark_driver-0.4.2 examples/exec_blank.rb
benchmark_driver-0.4.1 examples/exec_blank.rb
benchmark_driver-0.4.0 examples/exec_blank.rb