-
Notifications
You must be signed in to change notification settings - Fork 142
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
[performance] BoundSet: move properTypesByInferenceVariable before loop #3597
[performance] BoundSet: move properTypesByInferenceVariable before loop #3597
Conversation
reduces reproducer #3594 (comment) from 17.7s to 5s |
I'll take a look, though not right 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.
The change is technically sound.
In addition to the cleanup request, I'd like to see one more measurement:
You reported that the extreme case from #3594 (comment) benefits from the change, good.
What about "normal" usage? The computation properTypesByInferenceVariable()
will now be performed always, even if its result is never used. Does this method appear in any measurements of, e.g., GenericsRegressionTest_1_8
?
org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.core.compiler.batch/src/org/eclipse/jdt/internal/compiler/lookup/BoundSet.java
Outdated
Show resolved
Hide resolved
as it does not depend on the loop variables improves eclipse-jdt#3590 drastically
e62b428
to
d73bf0a
Compare
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.
I executed GenericsRegressionTest_1_8 with and without this PR and could not see a performance difference above the normal jitter. Both cases take ~ 1:22 +/-1sec to run. The method is used during that test for ~200ms. Its caller, BoundSet.incorporate(), is dominated by another method reduceOneConstraint().
As far as i understand properTypesByInferenceVariable() is super fast on cases that would not require to compute it and would only take significant time if the result will be used.
Just from that one screenshot I couldn't 100% follow your reasoning, but I appreciate you had a look into it.
as it does not depend on the loop variables
improves #3590 drastically