odinson icon indicating copy to clipboard operation
odinson copied to clipboard

Define mention equality

Open myedibleenso opened this issue 5 years ago • 4 comments

As we introduce multiple types of mentions, we must also define equality both to prevent overmatching and enable meaningful comparisons.

myedibleenso avatar Mar 24 '19 20:03 myedibleenso

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 avatar Jul 05 '20 05:07 kwalcock

@kwalcock: do we know what impact this has on the runtime? I wonder about the urgency of this issue.

MihaiSurdeanu avatar Jul 15 '20 17:07 MihaiSurdeanu

It is not urgent. It's just a potentially important optimization appended to the existing issue.

kwalcock avatar Jul 15 '20 17:07 kwalcock

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 .

BeckySharp avatar Jul 15 '20 18:07 BeckySharp