rust/library
bors 44f233f251 Auto merge of #132883 - LaihoE:vectorized_is_sorted, r=thomcc
vectorize slice::is_sorted

Benchmarks using u32 slices:
| len | New | Old |
|--------|----------------------|----------------------|
| 2      | 1.1997 ns           | 889.23 ps           |
| 4      | 1.6479 ns           | 1.5396 ns           |
| 8      | 2.5764 ns           | 2.5633 ns           |
| 16     | 5.4750 ns           | 4.7421 ns           |
| 32     | 11.344 ns           | 8.4634 ns           |
| 64     | 12.105 ns           | 18.104 ns           |
| 128    | 17.263 ns           | 33.185 ns           |
| 256    | 29.465 ns           | 60.928 ns           |
| 512    | 48.926 ns           | 116.19 ns           |
| 1024   | 85.274 ns           | 237.91 ns           |
| 2048   | 160.94 ns           | 469.53 ns           |
| 4096   | 311.60 ns           | 911.43 ns           |
| 8192   | 615.89 ns           | 2.2316 µs           |
| 16384  | 1.2619 µs           | 3.4871 µs           |
| 32768  | 2.5245 µs           | 6.9947 µs           |
| 65536  | 5.2254 µs           | 15.212 µs           |

Seems to be a bit slower on small N but much faster on large N.

Godbolt: https://rust.godbolt.org/z/Txn5MdfKn
2024-11-13 03:43:59 +00:00
..
alloc Rollup merge of #132929 - cuviper:check-alloc_zeroed, r=tgross35 2024-11-12 06:27:20 +01:00
backtrace@230570f2da Try latest backtrace 2024-08-29 12:13:19 -07:00
core Auto merge of #132883 - LaihoE:vectorized_is_sorted, r=thomcc 2024-11-13 03:43:59 +00:00
panic_abort step cfg(bootstrap) 2024-07-28 14:46:29 -04:00
panic_unwind move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
portable-simd move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
proc_macro Add a new trait proc_macro::ToTokens 2024-10-27 03:17:05 +01:00
profiler_builtins Don't skip nonexistent source files 2024-08-27 17:30:42 +10:00
rtstartup Let InstCombine remove Clone shims inside Clone shims 2024-07-25 15:14:42 -04:00
rustc-std-workspace-alloc
rustc-std-workspace-core update rustc-std-workspace crates 2024-11-04 07:45:15 +01:00
rustc-std-workspace-std
std Rollup merge of #132869 - lolbinarycat:library-fix-too_long_first_doc_paragraph, r=tgross35 2024-11-12 06:27:19 +01:00
stdarch@ff9a444503 bump stdarch 2024-10-28 09:42:42 +01:00
sysroot Make profiler_builtins an optional dependency of sysroot, not std 2024-10-17 22:08:36 +11:00
test Change a few &Option<T> into Option<&T> 2024-10-08 23:26:29 -04:00
unwind move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
windows_targets Win: Add dbghelp to the list of import libraries 2024-09-06 21:21:49 +00:00
Cargo.lock unpin and update memchr 2024-11-07 02:09:39 +01:00
Cargo.toml Auto merge of #129063 - the8472:cold-opt-size, r=Amanieu 2024-09-02 00:58:50 +00:00