about summary refs log tree commit diff
path: root/src/test/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <nnethercote@mozilla.com>2018-10-18 09:11:11 +1100
committerNicholas Nethercote <nnethercote@mozilla.com>2018-10-23 08:20:52 +1100
commitb5336c0b9755f635db4eafba6254e192ee451e6a (patch)
tree3048b8d7f13a010afde7abe53be1328275b42954 /src/test/debuginfo/enum-thinlto.rs
parent8a7048b72b7e9499dfae3f946baa92fc9e62a6b8 (diff)
downloadrust-b5336c0b9755f635db4eafba6254e192ee451e6a.tar.gz
rust-b5336c0b9755f635db4eafba6254e192ee451e6a.zip
Add a cheap mode for `compute_missing_ctors`.
`compute_missing_ctors` is called a lot. It produces a vector, which can
be reasonably large (e.g. 100+ elements), but the vector is almost
always only checked for emptiness.

This commit changes `compute_missing_ctors` so it can be called in a
cheap way that just indicates if the vector would be empty. If
necessary, the function can subsequently be called in an expensive way
to compute the full vector.

This change reduces instruction counts for several benchmarks up to 2%.
Diffstat (limited to 'src/test/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions