about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2020-12-03 01:52:24 +0000
committerNadrieril <nadrieril+git@gmail.com>2021-01-12 20:31:58 +0000
commite608d8f4e5e8e33b5d480323596d2aeabd129e4f (patch)
tree0c4c0c8a4cf430b5360bdccecbdb103cf2511900 /compiler/rustc_codegen_llvm/src
parent8598c9f6e53571d449ebf521fca1be4af9af1be6 (diff)
downloadrust-e608d8f4e5e8e33b5d480323596d2aeabd129e4f.tar.gz
rust-e608d8f4e5e8e33b5d480323596d2aeabd129e4f.zip
Make `DefIdForest` cheaper to clone
Since `DefIdForest` contains 0 or 1 elements the large majority of the
time, by allocating only in the >1 case we avoid almost all allocations,
compared to `Arc<SmallVec<[DefId;1]>>`. This shaves off 0.2% on the
benchmark that stresses uninhabitedness checking.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions