Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork56.4k
split private.hpp for faster compilation#20277
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
alalek commentedJun 17, 2021
Please provide performance numbers (with information about used configuration). AFAIK, code parsing usually takes less than 10% in compiler pipeline. |
julianreisch commentedJun 21, 2021
We measured 25 sec less build time (user time) on average (3 runs each): From 4036 sec down to 4011 sec. Our machine is an intel i7 8700k, we use ubuntu 20.04 and invoked cmake with "-DCMAKE_BUILD_TYPE=RelWithDebInfo". Is this the information you were looking for? |
alalek commentedJun 21, 2021
Thank you for information! Unfortunately such extra changes for possible benefits less that 1% (25 sec from 4000) doesn't look good. Anyway 4000sec per build is really slow (check free RAM (too many compilation processes may eat all memory), and storage speed (avoid using of network storage)). |
With the help of a code analysis tool we built, we noticed that private.hpp (indirectly) includes iw_image.hpp altough most cpps that include private.hpp do not use iw_image. This causes a huge amount of unnecessarily included lines of code for these cpps. Therefore, we split private.hpp into two files, and include the new file that includes iw_image only where it is needed. This results in a reduction of approx. 2 millions of lines of code (after preprocessor) and hence a reduced compilation time.