Compile, profile, compile again. This can give 3%-20% improvements. - gcc pgo https://gcc.gnu.org/wiki/AutoFDO/Tutorial - https://ddmler.github.io/compiler/2018/06/29/profile-guided-optimization.html - ms pgo https://docs.microsoft.com/en-us/cpp/build/profile-guided-optimizations?view=vs-2019 - clang pgo https://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization - how python implemented it: https://bugs.python.org/issue24915 - how clear linux does it in python extensions: https://clearlinux.org/news-blogs/boosting-python-profile-guided-platform-specific-optimizations
Compile, profile, compile again. This can give 3%-20% improvements.