Call super in BSON::OrderedHash#== instead of doing the comparison in Ruby.
This has a notable performance impact for large hashes.
This commit is contained in:
parent
b3ed1486e5
commit
9d2f3fbc27
|
@ -30,7 +30,7 @@ module BSON
|
|||
when BSON::OrderedHash
|
||||
keys == other.keys && values == other.values
|
||||
else
|
||||
!other.nil? && keys.size == other.keys.size && keys.all? {|x| self[x] == other[x] }
|
||||
super
|
||||
end
|
||||
rescue
|
||||
false
|
||||
|
|
Loading…
Reference in New Issue