hey @mw regarding this change proposal
did you notice any impact when bootstrapping
rustc itself with incremental turned on?
or wait, we don't set
-Ccodegen-units anyway in the default config.toml , do we?
oh but the point still stands nonetheless, even without an explicit setting...
@pnkfelix we do not set it explicitly, and the config.toml.example lies about the default (it's just the "regular" compiler default, so 16 w/o incremental and 2*modules it sounds like with)
Right. So with this change, it will go from being 2*modules to 256 when incremental is on, right?
Well, 2*modules I think but capped at 256?
okay yes; the main point is that the max (of 16) was not respected before, and now the new max (of 256) will be respected. Does that sound right?
Yes. I personally am not sure if @mw has done much experimentation around the exact number.
https://github.com/rust-lang/rust/pull/67834 has a number of perf runs with different default values. 256 seemed to be a good compromise between granularity and overhead.
I did not do any measurements on bootstrap time with this. I expect that
librustc exceeds the default and would profit from the change.
Also, the default can be tweaked in the future. The more important change is that the user now has control over something that could not be influenced before.