about summary refs log tree commit diff
path: root/library/alloc/benches
AgeCommit message (Collapse)AuthorLines
2021-10-04Rollup merge of #88452 - xu-cheng:vecdeque-from-array, r=m-ou-seJubilee-0/+15
VecDeque: improve performance for From<[T; N]> Create `VecDeque` directly from the array instead of inserting items one-by-one. Benchmark ``` ./x.py bench library/alloc --test-args vec_deque::bench_from_array_1000 ``` * Before ``` test vec_deque::bench_from_array_1000 ... bench: 3,991 ns/iter (+/- 717) ``` * After ``` test vec_deque::bench_from_array_1000 ... bench: 268 ns/iter (+/- 37) ```
2021-09-17Add benchmark for Vec::retainTennyZhuang-0/+15
2021-08-28add benchmark for From<[T; N]> in VecDequeCheng XU-0/+15
2021-08-28add benchmark for BTreeMap::from_iterCheng XU-0/+50
2021-07-29Fix may not to appropriate might not or must notAli Malik-1/+1
2021-07-24implement fold() on array::IntoIter to improve flatten().collect() perfThe8472-0/+6
``` # old test vec::bench_flat_map_collect ... bench: 2,244,024 ns/iter (+/- 18,903) # new test vec::bench_flat_map_collect ... bench: 172,863 ns/iter (+/- 2,141) ```
2021-06-09BTree: encapsulate LeafRange better & some debug assertsStein Somers-7/+32
2021-06-02Update expressions where we can use array's IntoIterator implementationMuhammad Mominul Huque-8/+2
2021-05-19remove InPlaceIterable marker from Peekable due to unsoundnessThe8472-1/+0
The unsoundness is not in Peekable per se, it rather is due to the interaction between Peekable being able to hold an extra item and vec::IntoIter's clone implementation shortening the allocation. An alternative solution would be to change IntoIter's clone implementation to keep enough spare capacity available.
2021-03-25Try to make Vec benchmarks only run code they are benchmarkingBen Kimock-68/+25
Many of the Vec benchmarks assert what values should be produced by the benchmarked code. In some cases, these asserts dominate the runtime of the benchmarks they are in, causing the benchmarks to understate the impact of an optimization or regression.
2021-03-21add transmute-via-iterators benchThe8472-0/+16
2021-03-16Vec::dedup optimization - add benchesSoveu-0/+90
2021-02-21BTreeMap: correct tests for alternative choices of BStein Somers-76/+0
2020-09-29Reorder benches const variableIvan Tham-2/+2
Move LEN so it is is read in order.
2020-09-25Rust vec bench import specific rand::RngCoreIvan Tham-1/+1
2020-09-22Liballoc bench vec use mem take not replaceIvan Tham-3/+3
2020-09-21Rollup merge of #76981 - pickfire:patch-5, r=Mark-SimulacrumRalf Jung-14/+14
liballoc bench use imported path Bencher test is already in scope, no need to use the full path
2020-09-21Auto merge of #75974 - SkiFire13:peekmut-opt-sift, r=LukasKalbertodtbors-0/+92
Avoid useless sift_down when std::collections::binary_heap::PeekMut is never mutably dereferenced If `deref_mut` is never called then it's not possible for the element to be mutated without internal mutability, meaning there's no need to call `sift_down`. This could be a little improvement in cases where you want to mutate the biggest element of the heap only if it satisfies a certain predicate that needs only read access to the element.
2020-09-21liballoc bench use imported path BencherIvan Tham-14/+14
test is already in scope, no need to use the full path
2020-09-20Added benchmarks for BinaryHeapGiacomo Stevanato-0/+92
2020-09-06Clean up vec benches bench_in_place styleIvan Tham-22/+21
2020-09-03fix benchmark compile errorsThe8472-12/+9
2020-09-03add benchmark to cover in-place extendThe8472-0/+14
2020-09-03fix: bench didn't black_box its resultsThe8472-3/+1
2020-09-03bench larger allocationsThe8472-6/+6
2020-09-03bench in-place zipThe8472-0/+37
2020-09-03exercise more of the in-place pipeline in the benchThe8472-1/+8
2020-09-03bench in-place collect of droppablesThe8472-0/+15
2020-09-03cyclic in-place reuse benchThe8472-0/+20
2020-09-03return the things under test so they get black_box()'edThe8472-1/+10
2020-09-03add benches from bluss' gistsThe8472-0/+104
2020-09-03update benchesThe8472-3/+4
2020-09-03benchThe8472-1/+40
2020-08-20Liballoc bench rename push_all extend_from_sliceIvan Tham-15/+15
2020-08-20Remove duplicated alloc vec bench push_all_moveIvan Tham-49/+0
push_all_move is the same as extend
2020-08-01More benchmarks of BTreeMap mutationStein Somers-22/+332
2020-07-27mv std libs to library/mark-0/+2011