-
Notifications
You must be signed in to change notification settings - Fork 62
Consider optimizing .equals()
operations
#455
Comments
[@quintesse] Just to document a couple of remarks from the Skype discussion:
|
[@emmanuelbernard] Not sure why 2. would be the case. the optimization would be an implementation of |
[@quintesse] Well that's because this:
suggests that it's the test that changes, not the implementation of equals, although I guess that could be done as well, Wrapping the code inside the equals in an |
[@FroMage] If we put that optimisation as inserted code at the beginning of each |
[@FroMage] Will wait for M4. |
[@FroMage] Optims for M5. |
[@FroMage] Moving to M6 |
[@FroMage] Moving to 1.2 |
[@emmanuelbernard] One use case for identity comparison in Java is to optimize
.equals()
implementations. If two instances are identical identity wise, they must be equal.The compiler could enforce that automatically so that this use case for Ceylon's
===
is no longer needed.Ceylon
a == b
would become in Java(a==b) || a.equals(b)
[Migrated from ceylon/ceylon-compiler#455]
The text was updated successfully, but these errors were encountered: