-
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
Optimise SpaceEngine.signature #21791
Conversation
Using `constrained` on a TypeLambda means adding one TypeLambda for all the type parameters in tp1, while newTypeVar creates a TypeLambda for each type parameter.
Instead of creating type vars, constraining against them, then instantiating them, just instantiate the PolyType with the scrutinee type args (or the lo/hi bound or bounded wildcard from the param).
I've run the OpenCB against these changes. So far there seems to be no new regressions since last nightly. |
@lrytz I dropped the extra special handling, happy to approve this now? |
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.
Yep, LGTM!
"may my presence forever slow your build" is one of the lesser known Halloween curses, but there you have it. Hopefully this annoys somebody enough to look into why the compilation performance regressed so much in the first place vs Scala 2, not just for this recent change. Or is this now expected to have Scala 2 levels of perf? Probably these test files need some attribution on them, since they are so big, but I don't feel like I'm so proud enough of them to push for that. Have fun. |
@WojciechMazur should we backport this to 3.6.2? |
Backports #21791 to the 3.6.2 branch. PR submitted by the release tooling. [skip ci]
Fixes #21569