Hacker News new | ask | show | jobs
by pjmlp 2723 days ago
And they do, when given PGO data, or when doing LTO.
1 comments

Given this is a topic of slow c++ builds, mentioning LTCG should come with the caveat that it will absolutely destroy your compile times.

It's also not infallible and you might find it difficult to track a regression if introduced by someone silently breaking a heurestic in the optimiser.

Sure, I was only mentioning that it is possible.

However with VC++ it doesn't seem to be that bad, when incremental compilation and linking are enabled.

According to MS[0], LTCG doesn't work with /INCREMENTAL (note /LTCG:INCREMENTAL is different). For my use cases, LTCG is unusable for anything other than our overnight builds.

[0] https://docs.microsoft.com/en-us/cpp/build/reference/ltcg-li...

Thanks for the correction.

That's what happens when I spend most the time on JVM/.NET worlds. :)

Yeah, the situation in .NET is much healthier as far as I've seen!