5 ms·
I would love to see a C++ compiler implement multi-core optimization and code generation for template instantiations. I feel this can be a big win for cases whe
by mrich 10y ago
I would love to see a C++ compiler implement multi-core optimization and code generation for template instantiations. I feel this can be a big win for cases where you instantiate a template n times and they are basically all independent from each other.
- DannyBee 10y agoclang/llvm are working on it. For codegen anyway. It's not clear that it will help with template instantiation, because it's fairly hard to parallelize. Certainly, possible, but very hard to do "optimally" (IE by sharing work instead of duplicating it). Given any initial work is likely to have to do duplicate work per thread, this usually cuts into your speedup quite a lot. Codegen, on the other hand, is pretty much fully parallelizable. This is the whole reason thinlto exists.