https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95305
--- Comment #2 from Jason <gcc-bugs at hussar dot me.uk> --- Overview: ========= This performance difference appears to affect many versions of g++: my testing indicates since g++ v7.3.0. The performance difference appears to be a 4-7x difference in the time taken to compile the example code. I have presented this a number of times and on a number of occasions I have had reports of similar differences, so this may not be unique to me. Steps to create: ================ 1. Download source tarball from libjmmcg.sf.net or checkout the repo. 2. In the expanded source directory create the directory "build". 3. "cd build" then "cmake .. -DBUILD_TYPE=Release -DBUILD_CHANGELOG=Off -DJMMCG_PERFORMANCE_TESTS=On" 4. "cd release/isimud/tests/" 5. Run "time make -j3 test_mit_exchanges_performance". Details: ======== - The code is heavily templated, with a lot of template meta-programming. I believe that the ~2x increase in time taken to build the code between g++ v8.1.0 & v8.2.0 & the clang versions is more related to a move from using "boost::mpl::vector" to varadic templates. I hypothesise that this code-change triggered different paths in the compiler that caused the increase. - All tests were carried out on the same physical hardware, a rather aged dual processor AMD Opteron 4180 with 32Gb or RAM running Gentoo/Linux. The computer was quiescent for the duration of each test. - Qualitatively, a number of other of my test cases appear to show this compilation-time difference. (Most likely due to the shared code.)