Stream: t-compiler

Topic: Is codegen-units+ThinLTO still problematic?


nagisa (Oct 25 2018 at 15:14, on Zulip):

Early this year we had issues with codegen-units + ThinLTO not being as good as codegen-units=1. We thus filled https://github.com/rust-lang/rust/issues/47745. I haven’t seen more reports in recent time (esp. after LLVM upgrade). Could this be solved now? Should check…

mw (Oct 26 2018 at 13:00, on Zulip):

Given that switching libstd from ThinLTO to 1 codegen-unit gives a noticeable speedup, I guess that 1 CGU is still the better option for runtime performance: https://github.com/rust-lang/rust/pull/55264#issuecomment-432323933

nikomatsakis (Oct 26 2018 at 17:58, on Zulip):

sad

nikomatsakis (Oct 26 2018 at 17:58, on Zulip):

these are the times when I feel like the "debug vs release" dichotomy is a bit too strong

nikomatsakis (Oct 26 2018 at 17:59, on Zulip):

but every time I try to chase down what it means to have a third level I wind up thinking that debug vs release is ok, we just need to make debug generate "mildly optimized" code

nikomatsakis (Oct 26 2018 at 17:59, on Zulip):

still, @mw, those perf numbers are not that different — clearly 1 CGU is better but there have to be a lot of use cases for which it's worth it

mw (Oct 29 2018 at 13:20, on Zulip):

Yeah, we generally treat the issue as "solved" because we default to ThinLTO for release builds anyway

nikomatsakis (Oct 29 2018 at 17:07, on Zulip):

ok ok

nikomatsakis (Oct 29 2018 at 17:08, on Zulip):

so basically "by default" you don't get the "max perf" setting

nikomatsakis (Oct 29 2018 at 17:08, on Zulip):

i'd be really great to have these workflows documented :/

nikomatsakis (Oct 29 2018 at 17:08, on Zulip):

well, maybe we do

nikomatsakis (Oct 29 2018 at 17:08, on Zulip):

I just imagine people running benchmarks and not knowing this :) seems easy to imagine

Last update: Nov 16 2019 at 01:05UTC