the.bay.news

Patched rustc to fix why editing one generic method recompiles all 200 instantiations

Rust Internals
Patched rustc to fix why editing one generic method recompiles all 200 instantiations
So I was getting annoyed by slow incremental builds and ended up digging into rustc_monomorphize::partitioning in the compiler . Found something interesting - every monomorphization of a generic function gets pooled into one volatile CGU keyed on (module_def_id, volatile), type args completely ignored. So if you touch one method body in a generic-heavy crate, every single instantiation gets re-emitted. All of em. Even ones that have nothing to do with your change. Wrote a patch that shards the ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.