Sha256: d8bdd134f26bbca4cfa3e56b6ea61c7b8fe0a84e6b93948a61b8caa5b1e5e81a

Contents?: true

Size: 592 Bytes

Versions: 5

Compression:

Stored size: 592 Bytes

Contents

require 'benchmark/ips'

Benchmark.ips do |x|
  x.report("caller()              ") { caller }
  x.report("caller_locations()    ") { caller_locations }
  x.report("caller(1, 2)          ") { caller(1, 2) }
  x.report("caller_locations(1, 2)") { caller_locations(1, 2) }
end

__END__

caller()
                        118.586k (±17.7%) i/s -    573.893k
caller_locations()
                        355.988k (±17.8%) i/s -      1.709M
caller(1, 2)
                        336.841k (±18.6%) i/s -      1.615M
caller_locations(1, 2)
                        781.330k (±23.5%) i/s -      3.665M

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 rspec-support/upstream/benchmarks/caller_vs_caller_locations.rb
opal-rspec-1.1.0.alpha2 rspec-support/upstream/benchmarks/caller_vs_caller_locations.rb
opal-rspec-1.1.0.alpha1 rspec-support/upstream/benchmarks/caller_vs_caller_locations.rb
opal-rspec-1.0.0 rspec-support/upstream/benchmarks/caller_vs_caller_locations.rb
opal-rspec-1.0.0.alpha1 rspec-support/upstream/benchmarks/caller_vs_caller_locations.rb