On 24.07.2017 21:29, Steve Fink wrote:

My guess is that the compilers/linkers don't really handle heavy C++
template usage very well, and end up generating and then eliminating
massive number of duplicate template instantiations. But that's idle
speculation.

I doubt there's much that compilers can do better here.

When compiling a C++ source, it needs to compile all that's needed
within that file (header-defined functions, constructors, template-
instantiations, etc). Later, at the linking phase, it can throw out
lots of duplicated code. For statically linked binaries, it's still
quite easy, but w/ shared libraries it gets pretty complex.


--mtx

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to