Found this while auditing uses of object_id in ruby/ruby. Pulled out from ruby/ruby#9276.
This PR replaces look-ups into a Set by object_ids, with an identity Set (see Set#compare_by_identity). This has the same semantics but is faster and doesn't trigger allocation of IDs for these objects.
Found this while auditing uses of
object_id
inruby/ruby
. Pulled out from ruby/ruby#9276.This PR replaces look-ups into a
Set
byobject_id
s, with an identity Set (seeSet#compare_by_identity
). This has the same semantics but is faster and doesn't trigger allocation of IDs for these objects.