You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attribute#equals uses object identity to compares its fields, so its unecessary (and in fact, potentially counter-productive) to compute the full hashCode of its fields in the hashCode method.
A student stumbled upon an issue where the hashCode of the Attribute changed because he made a change to the underyling AST. While this is not strictly a bug (AST should be immutable), it would have been avoided by using identityHashCode.
This will improve performance a lot: the current implem of SighNode#hashCode uses reflection and is very inefficient.
The text was updated successfully, but these errors were encountered:
Attribute#equals
uses object identity to compares its fields, so its unecessary (and in fact, potentially counter-productive) to compute the fullhashCode
of its fields in thehashCode
method.hashCode
of theAttribute
changed because he made a change to the underyling AST. While this is not strictly a bug (AST should be immutable), it would have been avoided by usingidentityHashCode
.SighNode#hashCode
uses reflection and is very inefficient.The text was updated successfully, but these errors were encountered: