Skip to content
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

Fix function call replacement #8810

Merged
merged 1 commit into from
Jun 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EnergyPlus/ScheduleManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ namespace ScheduleManager {
CSVAllColumnNameAndValues[colCnt - 1] = timestepColumnValues;
}
} else {
columnValue = std::stod(subString, nullptr);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is worth noting that this function is faster on my local machine while having no diffs.
Ran in 5.74 seconds.
image

Copy link
Contributor Author

@jmythms jmythms Jun 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, we would need to handle errors here, and I can explore that if this is something that interests us.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which file were you using here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, forgot to mention that. The SolarShadingTest_ImportedShading.idf file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, what is up with my computer??? 2 min 28 sec...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And with using with the std::stod option, about 15 sec... what in the world is going on?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably one is develop and the other one is release config. And probably you have a much better computer than I do 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested both in release configuration.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I double-checked, rebuilt, and ran multiple times. I'm in release mode on Mac. With UtilityRoutines::ProcessNumber this file is taking about 2:30-3:00 min; with std::stod, it's about 15 sec.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's very interesting... For me, Linux release build on CLion, UtilityRoutines::ProcessNumber takes 8 seconds vs std::stod takes 5ish.

columnValue = UtilityRoutines::ProcessNumber(subString, errFlag);
Copy link
Contributor Author

@jmythms jmythms Jun 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old functionis slower and takes 8.68 seconds.
image

if (errFlag) {
++numerrors;
columnValue = 0.0;
Expand Down