about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-05-22 15:27:58 +1000
committerNicholas Nethercote <nnethercote@mozilla.com>2018-05-23 08:55:35 +1000
commit8d0fad5d3832c6c1f14542ea0be038274e454524 (patch)
treeb7be9ffb122750e8585070ba3b0a14cd50a7a90d /src/rustllvm/RustWrapper.cpp
parent4c26e2e3fba61f18caca8bd43c57e1f1d799f07b (diff)
downloadrust-8d0fad5d3832c6c1f14542ea0be038274e454524.tar.gz
rust-8d0fad5d3832c6c1f14542ea0be038274e454524.zip
Shrink `LiveNode`.
`Liveness::users` is a vector that is occasionally enormous. For
example, doing a "clean incremental" check build of `inflate`, there is
one instance that represents 5,499 live nodes and 1087 vars, which
requires 5,977,413 entries. At 24 bytes per entry, that is 143MB.

This patch changes LiveNode from a usize to a u32. On 64-bit machines
that halves the size of these entries, significantly reducing peak
memory usage and memory traffic, and speeding up "clean incremental"
builds of `inflate` by about 10%.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions