
On 7 May 2015 at 18:38, John Maddock wrote:
Since C++ 11 we have extern templates, and that finally makes dllexporting template instantiations useful. I can see very significant potential benefits especially to compile and link times there,
Boost.Regex has done this since day 1 for compilers that support it (msvc and gcc). Compile time speedups are larger on msvc, but in both cases well worth the effort. In fact it's one reason the library hasn't gone header-only: it could probably be done, but compile times are just *so* much faster when the template instances are in an external lib...
Good stuff. For reference, AFIO a very simple library sees this with precompiled headers enabled: GCC: 12m => 10m MSVC: 7m => 2m clang: No change AFIO also has the ability to both use precompiled headers and not be header only: GCC: 4m MSVC: 1m So especially big wins for GCC. I suspect that C++ Modules cannot deliver any improvements over the non-header only with precompiled headers configuration. Good build config always beats compiler magic. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/