-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve Compiletime #88
Comments
Since clang 9 you can analyse compile time very detailed with the cxx flag |
Since hsm is header only, the compiler needs some seconds to process all the includes. The sml library provides a preprocessed header file. The script to create this header file can be found here. |
@ooxi thx for considering hsm. Compile time is currently also my biggest pain point. I will definetly try quom which will save us some seconds. If you have some more tips to reduce compile time heavily you are welcone. I was experimenting with mp11 for the hot path in dispatch table generation, but its way harder to code then using pure hana. |
@ooxi I added a preprocessed header as `hsm/hsm_gen.h". Using this header reduces the compile time by 1 second. |
@erikzenker that's great news! Just to make sure I understand you correctly, this reduces the compile time by one second or the compile time is reduced to one second? |
Just by one second 😒 |
While adding the latest features to the library the compile time got even worse. I started to write a gist about my investigations: https://gist.github.com/erikzenker/a318fd59cdb4de87db3d659cf425cc1a#file-clang_compile_time_cookbook-md |
I attached the current compile time trace which can be opened with chrome |
I was able to reduce the compile time a lot by replacing the |
There is a compile time regression since the last investigations. See state machine benchmark here: https://github.com/erikzenker/state-machine-benchmark/pull/7/checks?check_run_id=2403853253 |
Looks like the regression was introduced with the release |
It was |
There is another compile time analyzer tool that I stumbled upon: https://github.com/jrmadsen/compile-time-perf |
Regarding compile time: Does it matter how you write the actions/guards? Or is it mainly the number of transitions in the transition table that eat compile time? |
The last state machine benchmark run showed that runtime is very good and on par with sml and msm. Compiletime is on par with msm but a factor 20 higher than sml. Compiletime should be investigated further and the goal is to get onto the same level as sml.
The text was updated successfully, but these errors were encountered: