Comment by bloaf

9 hours ago

The next questions in my head are:

A) Is there any performance penalty on the compiled result due to being optimized in separate pieces

B) If not, why isn't the optimizer smart enough to split them up internally and optimize in parallel?

> A) Is there any performance penalty on the compiled result due to being optimized in separate pieces

AFAIK, the answer to this is no but only if LTO is doing a good job and actually optimizing well across object files.

> B) If not, why isn't the optimizer smart enough to split them up internally and optimize in parallel?

I think there was another comment by someone more knowledgable in Zig that this is something which is being discussed by the Zig compiler team.