There's a closed pull request on the void-packages repository python3: enable optimizations. https://github.com/void-linux/void-packages/pull/43791 Description: This `--enable-optimizations` flag enables profile-guided optimizations (PGO) and link-time optimization (LTO, but apparently only sometimes, depending on the platform). My rudimentary benchmarking indicates that compared to python3 from the repos, python3 built from this PR yielded performance improvements of around 10%-12% (I tried building python3 from master locally, but that one had horrendous performance for some reason). I'm not a benchmarking expert though, so I wanted others to try out their own benchmarks and post their results here. On my potato laptop, this change tripled build time from 5 minutes to 15 minutes. I don't think this is an issue however because changes to the python3 template are not done often (averaging once per month in the last 12 months), and the builders are much beefier than my laptop, so their build times will be even shorter anyway. TODO: - [ ] Is this also needed for `python3-tkinter`? (I don't think so, but better check) - [ ] Are there similar performance improvements with cross builds? (PGO runs and profiles a Python that is compiled for the host architecture, which is why I want to confirm this) #### Testing the changes - I tested the changes in this PR: **YES** (only python3, not python3-tkinter) @ahesford