diff options
| author | bors <bors@rust-lang.org> | 2021-12-24 01:54:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-24 01:54:56 +0000 |
| commit | e6f1f04e5215124244dfc87a5f9867580bf9386b (patch) | |
| tree | 198188ae541b02f37431db7097b2ac0cca8f7e90 /compiler/rustc_codegen_llvm/src/llvm/mod.rs | |
| parent | d6d12b6a5d2c2906ef4e85ce1d50a8684cf43626 (diff) | |
| parent | 8217138f445e128f3bd4e4f517ac989d2abb621f (diff) | |
| download | rust-e6f1f04e5215124244dfc87a5f9867580bf9386b.tar.gz rust-e6f1f04e5215124244dfc87a5f9867580bf9386b.zip | |
Auto merge of #92220 - nnethercote:RawVec-dont-recompute-capacity, r=joshtriplett
RawVec: don't recompute capacity after allocating. Currently it sets the capacity to `ptr.len() / mem::size_of::<T>()` after any buffer allocation/reallocation. This would be useful if allocators ever returned a `NonNull<[u8]>` with a size larger than requested. But this never happens, so it's not useful. Removing this slightly reduces the size of generated LLVM IR, and slightly speeds up the hot path of `RawVec` growth. r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
0 files changed, 0 insertions, 0 deletions
