TL;DR
Use Profile-Guided Optimization (PGO) to optimize the CPU performance for Factorio. What PGO is - https://clang.llvm.org/docs/UsersManual ... timization (Clang docs, this optimization is also available for other C++ compilers like MSVC and GCC).What ?
I suggest optimizing the game with Profile-Guided Optimization. This optimization gathers some runtime statistics about how the application is executed. Then, you can use these statistics (aka a PGO profile) during the release compilation to provide a compiler with additional information about the usual execution paths, etc. Based on this information, the compiler can perform various optimizations like inlining, loop roll/unroll, etc. in a much better way. PGO profiles can be gathered from various "sample" Factorio saves that you decide are "regular" for the game.PGO works nicely with Link-Time Optimization (LTO) so no traps should be here. It's even recommended to use PGO with LTO (however, I hope LTO is already enabled for the Factorio Release builds anyway).
Much more details about PGO (various articles, a lot of benchmarks for different domains including game engines, etc.) can be found in my GitHub repository about PGO - https://github.com/zamazan4ik/awesome-pgo.
If you have already used PGO or tried to integrate it into the game earlier, it would be awesome if you could share your benchmark results. I would be happy to link to the repository above.