-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve performance of SpoonUtil.resolveConstant
#573
Labels
Comments
Luro02
added
enhancement
New feature or request
high-priority
Issues that should be solved as soon as possible
perf 🏎️💨
performance
labels
Jul 14, 2024
Another idea was to clone them lazily like a clone on write, but not sure if that would be possible. |
Luro02
removed
the
high-priority
Issues that should be solved as soon as possible
label
Jul 23, 2024
Luro02
added a commit
to Luro02/autograder
that referenced
this issue
Jul 24, 2024
The lazy cloning sounds like a nice idea but seems impossible to implement. This would make it harder to implement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The current implementation is unnecessarily slow, because of redundant clones performed by the
Evaluator
. The clones are necessary for someFold
, because it would otherwise invalidate the model, but for looking up if a variable has a constant value likectVariableReference.getDeclaration().getInitExpression() instanceof CtLiteral<?> ctLiteral
, we can be a lot more conservative with cloning or skip it all together.The text was updated successfully, but these errors were encountered: