-
Notifications
You must be signed in to change notification settings - Fork 394
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
Reduce daylighting allocations #9067
Conversation
This includes the changes from #9002 so it looks like more changes than it really is. |
src/EnergyPlus/DataDaylighting.hh
Outdated
Continuous = 1, | ||
Stepped = 2, | ||
ContinuousOff = 3 | ||
ContinuousOff = 3, |
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.
Why was a comma added here? Does unassigned = -1 apply here with num at the end? I see a lot of comments on that, and yeah it's a good practice, but is there any overhead for those enums where num is never used?
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.
Enumerations are compile-time constants, not runtime variables. There is no storage or other runtime overhead associated with them. Here is a more detailed explanation of the patterns we are trying to establish.
@Myoldmopar After #9002 is merged, I'll pull this branch up and undraft it for possible inclusion in 9.6, but no big deal if it misses the boat. |
…ightingAllocations
@Myoldmopar This is ready for review. No big deal if it waits until post-9.6 |
This one looks good, no need to wait. I'm currently building and testing with both this and #9065 merged in and if all is good they will both drop. |
Everything passes locally with both this and the other PR in. Merging now. |
Pull request overview
While the daylighting code is fresh in mind, an attempt at some small performance improvement by avoiding local allocates and reducing the size of arrays when there are no blinds in the model.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.