odinson
odinson copied to clipboard
Define mention equality
As we introduce multiple types of mentions, we must also define equality both to prevent overmatching and enable meaningful comparisons.
Especially if mentions are immutable or nearly so, it seems to help to have the hash code lazily evaluated and cached. The default behavior was apparently to recalculate the hash code for each comparison, which was very expensive. See Odin for examples. Note also all the canEqual() stuff.
@kwalcock: do we know what impact this has on the runtime? I wonder about the urgency of this issue.
It is not urgent. It's just a potentially important optimization appended to the existing issue.
let's def not forget this, optimization is VERY key to odinson!
On Wed, Jul 15, 2020 at 10:47 AM Keith Alcock [email protected] wrote:
External Email
It is not urgent. It's just a potentially important optimization appended to the existing issue.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lum-ai/odinson/issues/15#issuecomment-658908122, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJCPCIGGDBQYFYXDFRFBX3R3XTRBANCNFSM4HAW6EJQ .