Skip to content

Commit 76ea82a

Browse files
committed
Auto merge of #155443 - jdonszelmann:canonical, r=lcnr
Improve caching by introducing `TypingMode::ErasedNotCoherence` r? @lcnr This introduces `TypingMode::ErasedNotCoherence`. Most typing modes contain a list of opaque types, which are quite often unused during canonicalization. With this change, any time we try canonicalization, we replace whichever typing mode we're currently in with `ErasedNotcoherence`, attempt to canonicalize, and if that fails *retry* in the original typing mode. If erased mode succeeds, this is beneficial because that way the opaque types don't end up in the cache key, allowing more cache reuse. This seems to have a small (0.5%) slowdown on most programs, but a dramatic (>60%) speedup in specific cases like the rustc-perf `wg-grammar` benchmark. Some more improvements are expected with "eager normalization", which is work that's under way right now.
2 parents 4e84c51 + 714d695 commit 76ea82a

0 file changed

File tree

    0 commit comments

    Comments
     (0)