-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fall back to direct subtype comparison at the end in dropIfSuper and dropIfSub #20523
Conversation
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit https://dotty-bench.epfl.ch/20523/ to see the changes. Benchmarks is based on merging with main (dea3d10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes look reasonable, but we should check they don't introduce a performance regression elsewhere. Have a look at the discussion #20034. Can you run the test cases mentioned there and check whether they become significantly slower?
@odersky I compared the compiling time of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, looks all good then.
Improve compiling in #20516.
We need to be careful to check branches of AndTypes and OrTypes in correct order, see discussion in issue #20516.
Fall back to direct subtype comparison at the end in dropIfSuper and dropIfSub.
We may need to improve subtype checking for large intersections further to be able to fully test the example.
Currently,
tests/pos-deep-subtype/i20516.scala
compiles in 5s with this PR, and in 40s on the main branch.