Skip to content

@jonleighton /results.txt
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
$ ruby test.rb
Calculating -------------------------------------
success 51960 i/100ms
failure 4653 i/100ms
-------------------------------------------------
success 2687778.5 (±3.7%) i/s - 13405680 in 4.996239s
failure 53863.7 (±3.5%) i/s - 269874 in 5.016999s
require 'benchmark/ips'
o = Object.new
id = o.__id__
Benchmark.ips do |r|
r.report('success') { ObjectSpace._id2ref(id) rescue nil }
r.report('failure') { ObjectSpace._id2ref(6) rescue nil }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.