No this is not how you benchmark. Apply all changes in your branch, then try to measure PCH-on versus PCH-off.Currently you're measuring noPCH+massive amount of symbols and PCH+smaller amount of symbols. The linking step in C::B is serial, so it has big effects on the overall time. Smaller number of symbols improves linking performance.
Also what happens if you just put only wx related includes in the PCH or you use the wxprec.h or whatever is called?
p.s. My build time on Linux, GCC 9.3.0, Amd Ryzen7 1700 (relatively slow CPU in 2020, it is slower than a mobile cpu produced by a fashion/fruit company) is:
1. 93 sec with PCH.
2. 123 sec without PCH.
So, you need to buy better CPU and/or switch to better compiler. GCC on windows is massively slow. So working to switch to something like clang would be a big improvement in both speed and compiler quality (GCC on windows is pretty bad compared to how it behaves on Linux). I've not use clang on windows, but I doubt it would be as bad as GCC is. On linux clang and GCC are comparable.
And I pay 60 seconds or more every time I edit a header which is in the PCH, super annoying.
p.p.s. The compilation is really slow if the compiler emits too many errors/warnings. If you're not error/warning free you'll get horrendous build times. This is something which needs to be investigated quite a bit.
p.p.p.s. The compilation is non-optimal (and it will get worse on newer non-fruit cpus), because it cannot schedule work from multiple projects. Linking is blocking progress
. This is clearly visible when building any plugins. Someday I'll write a ninja-build generator, but there are more important projects/problems first.
p.p.p.p.s. The switch from wx28 to wx30 made compilation visibly slower. I've not debugged why, but my guess is the use of basic_string as the base for wxString.