Files
rust/library/alloc/src
bors e6f1f04e52 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`
2021-12-24 01:54:56 +00:00
..
2021-12-19 21:08:19 +01:00
2021-12-18 11:21:58 +01:00
2021-12-12 00:27:27 +01:00
2021-11-05 17:14:57 +10:00
2021-12-12 00:27:27 +01:00
2021-04-21 15:45:41 +02:00