A major side project of mine, ChaiScript suffers from extremely long compile times. Part of the reason is because of 1000’s of templates being instantiated for even the simplest project. GCC 4.5 has made improvements in template compilation taking what used to be Really Bad (Geometric? Exponential? Not sure, didn’t run it myself) to Really Good, or something approximating linear time, to add new template instantiations. This one improvement has huge implications for ChaiScript, probably negating the main single complaint that users of ChaiScript have. I would like to also take advantage of improvements in variadic templates, but I’m not sure if it makes sense, for portability reasons, to move ChaiScript there yet.
Profile mode adds a runtime analysis to your project of common STL uses. The runtime analysis then provides suggestions for simple changes that could greatly affect your code performance. For instance, it may suggest replacing
std::list if it would be more appropriate. The idea would be to compile your application with profile mode enabled, check the output, make the suggested changes, then recompile without profile mode. The examples provided are impressive.