-
Notifications
You must be signed in to change notification settings - Fork 126
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 @expressions
performance by pre processing sets
#815
base: main
Are you sure you want to change the base?
Conversation
add_similar_to_expression!(EP[:eGenerationByZone], eGenerationByVRE) | ||
# We use the transpose here because eGenerationByZone is [1:Z, 1:T] and | ||
# ePowerBalanceDisp is [1:T, 1:Z]. | ||
add_similar_to_expression!(EP[:eGenerationByZone], ePowerBalanceDisp') |
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.
This might need double checking by the GenX developers to confirm they're okay with eGenerationByVRE
being removed
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.
Is there a before/after benchmark?
The varaibility has been large but I got this for build times:
after:
which is about a 12% improvement. GC time is around 50% in both cases. |
I guess the full improvement is a bit more because of the changes in MutableArithmetics. |
Yup. I will double-check the number, including MA. |
Description
This PR replaces #773 the improvement is the better performance in constructing JuMP
@expression
s.This new PR only contains the set pre-processing from #773, so it is easier to review.
These set operations are performed more frequently than necessary. Pre-processing the sets before building expressions is more efficient as it requires strictly less work and allocations.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Replaces #773
Checklist
How this can be tested
This should not alter any outputs.
Post-approval checklist for GenX core developers
After the PR is approved