about summary refs log tree commit diff
path: root/src/libcore/benches/slice.rs
AgeCommit message (Collapse)AuthorLines
2020-07-27mv std libs to library/mark-84/+0
2019-12-06Format libcore with rustfmt (including tests and benches)David Tolnay-3/+4
2019-08-06Improve `ptr_rotate` performance, tests, and benchmarksAaron Kutch-0/+26
2018-12-25Remove licensesMark Rousskov-10/+0
2017-11-11Improve the performance of binary_search by reducing the number ofAlkis Evlogimenos-0/+67
unpredictable conditional branches in the loop. In addition improve the benchmarks to test performance in l1, l2 and l3 caches on sorted arrays with or without dups. Before: ``` test slice::binary_search_l1 ... bench: 48 ns/iter (+/- 1) test slice::binary_search_l2 ... bench: 63 ns/iter (+/- 0) test slice::binary_search_l3 ... bench: 152 ns/iter (+/- 12) test slice::binary_search_l1_with_dups ... bench: 36 ns/iter (+/- 0) test slice::binary_search_l2_with_dups ... bench: 64 ns/iter (+/- 1) test slice::binary_search_l3_with_dups ... bench: 153 ns/iter (+/- 6) ``` After: ``` test slice::binary_search_l1 ... bench: 15 ns/iter (+/- 0) test slice::binary_search_l2 ... bench: 23 ns/iter (+/- 0) test slice::binary_search_l3 ... bench: 100 ns/iter (+/- 17) test slice::binary_search_l1_with_dups ... bench: 15 ns/iter (+/- 0) test slice::binary_search_l2_with_dups ... bench: 23 ns/iter (+/- 0) test slice::binary_search_l3_with_dups ... bench: 98 ns/iter (+/- 14) ```