diff options
| author | bors <bors@rust-lang.org> | 2013-10-04 21:21:31 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-10-04 21:21:31 -0700 |
| commit | 5a1073fbabed2c0265a33dab6fdb86df3d957428 (patch) | |
| tree | fb250672bc36853d30d35368fdb35549ea1ce444 /src/test/codegen/stack-alloc-string-slice.rs | |
| parent | 1a3141b7c5c3beb2a87e988cf44209979c555946 (diff) | |
| parent | 19e9766c29e3e958409d7232eb0c23b3734988aa (diff) | |
| download | rust-5a1073fbabed2c0265a33dab6fdb86df3d957428.tar.gz rust-5a1073fbabed2c0265a33dab6fdb86df3d957428.zip | |
auto merge of #9722 : alexcrichton/rust/less-mem, r=sanxiyn
According to http://huonw.github.io/isrustfastyet/mem/#012f909, the "const
marking" pass generates about 400MB of extra memory during compilation. It
appears that this is due to two different factors:
1. There is a `ccache` map in the ty::ctxt which is only ever used in this
pass, so this commit moves the map out of the ty::ctxt struct and into
just this pass's visitor. This turned out to not benefit that much in
memory (as indicated by http://i.imgur.com/Eo4iOzK.png), but it's helpful
to do nonetheless.
2. During const_eval, there are a lot of lookups into decoding inlined items
from external crates. There is no caching involved here, so the same
static or variant could be re-translated many times. After adding
separate caches for variants and statics, the memory peak of compiling
rustc decreased by 200MB (as evident by http://i.imgur.com/ULAUMtq.png)
The culmination of this is basically a slight reorganization of a caching map
for the const_eval pass along with a 200MB decrease in peak memory usage when
compiling librustc.
Diffstat (limited to 'src/test/codegen/stack-alloc-string-slice.rs')
0 files changed, 0 insertions, 0 deletions
