-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[Performance] Running list of improvements for performance reasons #4458
Comments
|
|
|
|
Before we start to chip away at the this list, we'll want to establish a base test case to measure performance gains and quantify the result in some meaningful way. @jmarrec Are there some specific regression tests we can use to for this? |
|
Closing as this is complete. #4532 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Enhancement Request
This issue is to centralize some (fairly simple) actionable items in order to improve performance. These are basically things that will avoid doing extra work or doing extra copies.
Avoid push_backs when possible
OpenStudio/src/model/Space.cpp
Lines 264 to 282 in 65607ae
constexpr std::array
would be better (Need to check impact on ruby code, and also some types like IddObjectType aren't suitable for use in a constexpr context as they aren't 'literal')Make sure there are no functions left that take
std::string
(or any other non POD types) by value without reason (there are a couple of cases where we are mutating the string) to avoid extra copies: for your pImpl case, that's at least TWO extra copies for each call. There are close to a thousand occurrences left in justmodel/
OpenStudio/src/model/SizingSystem.hpp
Line 240 in 65607ae
OpenStudio/src/model/SizingSystem_Impl.hpp
Line 229 in 65607ae
Same thing for setters taking a
boost::optional<T>
argument and checking if the argument is present...OpenStudio/src/model/ChillerElectricEIR.cpp
Lines 315 to 321 in 65607ae
OpenStudio/src/model/CoolingTowerVariableSpeed.cpp
Lines 321 to 331 in 65607ae
Modify all
for (T t : vectorOfTs)
tofor(const T& t: vectorOfTs)
if possible orfor (T& t: vectorOfTs)
if mutating it, to avoid extra copies on loops. The FT is ridden with this for eg:OpenStudio/src/energyplus/ForwardTranslator.cpp
Lines 240 to 245 in 65607ae
The text was updated successfully, but these errors were encountered: