rust/library/core/tests
Amanieu d'Antras bb58488207 Rewrite binary search implementation
This restores the original binary search implementation from #45333
which has the nice property of having a loop count that only depends on
the size of the slice. This, along with explicit conditional moves
from #128250, means that the entire binary search loop can be perfectly
predicted by the branch predictor.

Additionally, LLVM is able to unroll the loop when the slice length is
known at compile-time. This results in a very compact code sequence of
3-4 instructions per binary search step and zero branches.

Fixes #53823
2024-07-30 17:07:56 +01:00
..
async_iter
ffi CStr: derive PartialEq, Eq; add test for Ord 2024-07-25 14:18:40 +03:00
fmt Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
hash Reformat use declarations. 2024-07-29 08:26:52 +10:00
io
iter Reformat use declarations. 2024-07-29 08:26:52 +10:00
net Reformat use declarations. 2024-07-29 08:26:52 +10:00
num Reformat use declarations. 2024-07-29 08:26:52 +10:00
ops
panic
alloc.rs
any.rs
array.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ascii.rs
asserting.rs
atomic.rs
bool.rs
cell.rs
char.rs
clone.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
cmp.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
const_ptr.rs
convert.rs
error.rs
ffi.rs CStr: derive PartialEq, Eq; add test for Ord 2024-07-25 14:18:40 +03:00
future.rs Avoid ref when using format! for perf 2024-07-19 12:23:49 -04:00
intrinsics.rs Step bootstrap cfgs 2024-05-01 22:19:11 -04:00
lazy.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
lib.rs Stabilize offset_of_nested 2024-07-29 17:50:12 +01:00
macros.rs
manually_drop.rs
mem.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
nonzero.rs
ops.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
option.rs Make Option::as_[mut_]slice const 2024-06-19 21:44:47 +01:00
panic.rs
pattern.rs
pin_macro.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
pin.rs
ptr.rs Fix doc nits 2024-07-26 13:26:33 +01:00
result.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
simd.rs
slice.rs Rewrite binary search implementation 2024-07-30 17:07:56 +01:00
str_lossy.rs Stabilize Utf8Chunks 2024-04-24 15:27:47 -07:00
str.rs
task.rs
time.rs
tuple.rs
unicode.rs
waker.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00