Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-resolve ==, != after expanding opaque types #9583

Merged
merged 2 commits into from Aug 19, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Aug 18, 2020

Resolve overloading of == and != after expanding opaque types. If
we do not do that, all comparisons of opaque types will go to object
equals, which involves boxing. Since opaque types have a "no-boxing"
promise, this is problematic.

Resolve overloading of `==` and `!=` after expanding opaque types. If
we do not do that, all comparisons of opaque types will go to object
equals, which involves boxing.
@odersky
Copy link
Contributor Author

odersky commented Aug 18, 2020

This was part of the performance optimizations batch.

@odersky
Copy link
Contributor Author

odersky commented Aug 19, 2020

test performance please

@dotty-bot
Copy link
Contributor

performance test scheduled: 1 job(s) in queue, 0 running.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

case _ =>
tree
else
tree
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to restrict it to opaque types. Let's see how it impacts performance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree.

@dotty-bot
Copy link
Contributor

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/9583/ to see the changes.

Benchmarks is based on merging with master (64a239f)

Also, document what is done in the doc page for opaque types.
@odersky odersky merged commit 423bcd2 into scala:master Aug 19, 2020
@odersky odersky deleted the fix-opaque-eq branch August 19, 2020 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants