diff options
| author | bors <bors@rust-lang.org> | 2025-06-08 15:26:49 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-06-08 15:26:49 +0000 |
| commit | fb644e6a1a7d34c6bbb5ecfe5c185f8c977d6bb3 (patch) | |
| tree | 8490a16eeb3a6fd12150195172a3b21e38cb0f0d /tests/ui/array-slice-vec/array_const_index-1.stderr | |
| parent | 244bbfc60ee8593db96892468eee876240cb7ba1 (diff) | |
| parent | 8a56ed4c89d38618e065f7d9ec6be0390fdabe31 (diff) | |
| download | rust-fb644e6a1a7d34c6bbb5ecfe5c185f8c977d6bb3.tar.gz rust-fb644e6a1a7d34c6bbb5ecfe5c185f8c977d6bb3.zip | |
Auto merge of #142095 - joshtriplett:optimize-veccache, r=SparrowLii
Simplify and optimize `VecCache`'s `SlotIndex::from_index` Simplify and optimize `SlotIndex::from_index` Break out bucket 0 (containing `idx < 4096`) as an early return, which simplifies the remainder of the function, and allows optimizing the `checked_ilog2` since it can no longer return `None`. This reduces the runtime of `vec_cache::tests::slot_index_exhaustive` (which calls `SlotIndex::from_index` for every `u32`, twice) from ~15.5s to ~13.3s. Separately, simplify the test case as well. (The old and new code passes with the old and new test case.) --- Noticed because `slot_index_exhaustive` stood out as taking unusually long compared to other tests, so I started investigating what it was doing.
Diffstat (limited to 'tests/ui/array-slice-vec/array_const_index-1.stderr')
0 files changed, 0 insertions, 0 deletions
