diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2020-12-03 01:52:24 +0000 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2021-01-12 20:31:58 +0000 |
| commit | e608d8f4e5e8e33b5d480323596d2aeabd129e4f (patch) | |
| tree | 0c4c0c8a4cf430b5360bdccecbdb103cf2511900 /compiler/rustc_codegen_llvm/src | |
| parent | 8598c9f6e53571d449ebf521fca1be4af9af1be6 (diff) | |
| download | rust-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
