Sha256: 4baa34ef0c324222d966faf9cd6b71278ffd0ca0e686f287d9aa910d63d6bd9b

Contents?: true

Size: 251 Bytes

Versions: 10

Compression:

Stored size: 251 Bytes

Contents

require 'benchmark/driver'

class Array
  alias_method :blank?, :empty?
end

Benchmark.driver(runner: :eval) do |x|
  x.prelude %{ array = [] }
  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/eval_blank.rb
benchmark_driver-0.8.5 examples/eval_blank.rb
benchmark_driver-0.8.4 examples/eval_blank.rb
benchmark_driver-0.8.3 examples/eval_blank.rb
benchmark_driver-0.8.2 examples/eval_blank.rb
benchmark_driver-0.8.1 examples/eval_blank.rb
benchmark_driver-0.8.0 examples/eval_blank.rb
benchmark_driver-0.7.2 examples/eval_blank.rb
benchmark_driver-0.7.1 examples/eval_blank.rb
benchmark_driver-0.7.0 examples/eval_blank.rb