| ▲ | jjmarr 18 hours ago | |
> each compilation unit will end up with its own copy of templated function, which creates extra work, code bloat etc. Yes, that's what causes the parsing bottleneck. Unity builds don't need to create multiple copies of templated functions. C++20 modules could fix that because the function is parsed before substitution. Tbd on if that optimization works yet, I tried it on Clang 18 and it didn't. > But the linker is single threaded and notoriously slow I think most linkers have parallel LTO and `mold` provides actual parallel linking. | ||