mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 09:23:31 +00:00
Shrink MIR basic-block statement vectors to fit before caching them Every MIR basic block allocates a vector for its statements. These statement vectors grow via the usual heuristics, and never get re-shrunk to the correct size for their contents. This holds on to a fair bit of memory. Shrink them to fit right before we cache them. For an aws-sdk-ec2 check, this saves ~80 MiB of peak max-RSS (~1.45%), at the cost of 0.3% in instructions. r? nnethercote