4 ms·
It's compile times, those are very easily tested and measured.
by Arzh 11y ago
It's compile times, those are very easily tested and measured.
- tacos 11y agoTemplatizing/de-templatizing enough code to see a difference would be a significant effort on any non-trivial code base. But I'll spare you the trouble: instantiating a template is less work than parsing a duplicated file. Some of the early C++ compilers had problems but it hasn't been an issue in 20+ years. If you look at both the G++ and Clang test suites you'll see they verify performance, memory usage and correctness with complicated templates by doing basically this exercise for you.
- Arzh 11y agook, thank