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

Improved compile time performance (clang/gcc) #69

Merged
merged 20 commits into from
Dec 1, 2022
Merged

Conversation

JessyDL
Copy link
Owner

@JessyDL JessyDL commented Dec 1, 2022

Note the following body of work mostly affects clang and gcc. msvc will come in another PR. The performance of msvc did not noticeably change during the course of this PR.

Compile time performance was improved for clang/gcc by doing the following:

  • removed the need for <fstream> in ustring.hpp by moving it to ustream.hpp
  • moved psl::ecs::state_t::on_condition to its own file psl/ecs/on_condition.hpp, this removed the need for psl/ecs/details/execution.hpp which includes <execution>
  • moved psl::ecs::state_t::order_by to its own file psl/ecs/order_by.hpp, this resulted in <future> no longer being needed in state.hpp
  • removed dependency on ustring.hpp for assertions.hpp, and <fmt> in case of non-debug builds
  • removed assertions.hpp from automatic inclusion everywhere
  • moved utility::debug to a seperate file debug_utils.hpp/cpp
  • moved around various parts of psl::serializer to lower compilation pressure. Future work should be done in respect of Polymorphic serialization is linked to specific encoder/decoder #70
  • various other improvements to platform_utils.hpp, mostly by moving code to platform_utils.cpp

Locally this resulted in a drop of 15%-20% seconds across all TU's (measured using clang12 w/ -ftime-trace)

… and `order_by` to seperate include file, and removing `<functional>` need
@JessyDL JessyDL added this to the 0.2.0 milestone Dec 1, 2022
@JessyDL JessyDL force-pushed the improve/compile-time branch from a9c15de to 2a3c639 Compare December 1, 2022 15:10
@JessyDL JessyDL force-pushed the improve/compile-time branch from 1840d6b to 3ebef98 Compare December 1, 2022 15:51
@JessyDL JessyDL force-pushed the improve/compile-time branch from 6fa4161 to e69cc21 Compare December 1, 2022 19:44
@JessyDL JessyDL force-pushed the improve/compile-time branch from e69cc21 to bfa9af1 Compare December 1, 2022 20:01
@JessyDL JessyDL changed the title Improved compile time performance Improved compile time performance (clang/gcc) Dec 1, 2022
Comment on lines +64 to +66
{
return thread_name(std::this_thread::get_id());
}

Check failure

Code scanning / CodeQL

Missing return statement

Function thread_name should return a value of type const string8_t but does not return a value here
Comment on lines +57 to +59
{
return m_ThreadMap[id];
}

Check failure

Code scanning / CodeQL

Missing return statement

Function thread_name should return a value of type const string8_t but does not return a value here
@JessyDL JessyDL self-assigned this Dec 1, 2022
@JessyDL JessyDL merged commit 81e03ca into develop Dec 1, 2022
@JessyDL JessyDL deleted the improve/compile-time branch December 1, 2022 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant