os-rust/library/core/src
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 make const_alloc_layout feature gate only about functions that are already stable 2024-11-01 14:32:59 +01:00
array Auto merge of #132458 - RalfJung:rustc-const-unstable, r=Amanieu 2024-11-03 02:32:48 +00:00
ascii Add more precondition check tests 2024-10-09 19:34:27 -04:00
async_iter Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
cell Re-do recursive const stability checks 2024-10-25 20:31:40 +02:00
char stabilize const_unicode_case_lookup 2024-11-12 15:13:31 +01:00
clone CloneToUninit: use a private specialization trait 2024-07-29 20:44:43 +03:00
cmp Use generic NonZero everywhere in core. 2024-02-22 15:17:33 +01:00
convert Fix doc nits 2024-07-26 13:26:33 +01:00
ffi add const_eval_select macro to reduce redundancy 2024-11-05 09:26:08 +01:00
fmt Fixed typo, rebased 2024-11-04 12:43:57 -05:00
future rustdoc-search: simplify rules for generics and type params 2024-10-30 12:27:48 -07:00
hash remove const_hash feature leftovers 2024-11-02 11:27:14 +01:00
intrinsics remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
io Fix doc nits 2024-07-26 13:26:33 +01:00
iter Remove do_not_const_check from Iterator methods 2024-10-30 19:24:34 +00:00
macros add const_eval_select macro to reduce redundancy 2024-11-05 09:26:08 +01:00
mem get rid of a whole bunch of unnecessary rustc_const_unstable attributes 2024-11-02 09:59:55 +01:00
net get rid of a whole bunch of unnecessary rustc_const_unstable attributes 2024-11-02 09:59:55 +01:00
num Auto merge of #132972 - matthiaskrgr:rollup-456osr7, r=matthiaskrgr 2024-11-13 01:00:17 +00:00
ops Rollup merge of #132144 - adetaylor:receiver-trait-itself, r=wesleywiser 2024-11-11 21:58:29 +01:00
panic stabilize const_arguments_as_str 2024-11-03 07:49:24 +01:00
prelude Avoid comments that describe multiple use items. 2024-07-17 08:02:46 +10:00
ptr Generalize NonNull::from_raw_parts per ACP362 2024-11-11 00:05:17 -08:00
range Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
slice Auto merge of #132883 - LaihoE:vectorized_is_sorted, r=thomcc 2024-11-13 03:43:59 +00:00
str Add new unstable feature const_eq_ignore_ascii_case 2024-11-05 22:22:31 -05:00
sync get rid of a whole bunch of unnecessary rustc_const_unstable attributes 2024-11-02 09:59:55 +01:00
task get rid of a whole bunch of unnecessary rustc_const_unstable attributes 2024-11-02 09:59:55 +01:00
unicode stabilize const_unicode_case_lookup 2024-11-12 15:13:31 +01:00
any.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
arch.rs update bootstrap configs 2024-10-15 20:30:23 -07:00
ascii.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
asserting.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
bool.rs [Clippy] Swap filter_map_bool_then to use diagnostic item instead of path 2024-09-19 13:13:42 +01:00
borrow.rs Suggest borrowing on fn argument that is impl AsRef 2024-05-09 23:25:31 +00:00
cell.rs Update grammar in std::cell docs. 2024-11-11 13:22:03 -05:00
clone.rs update cfgs 2024-09-05 17:24:01 +01:00
cmp.rs library: consistently use American spelling for 'behavior' 2024-10-25 12:02:47 +02:00
default.rs update cfgs 2024-09-05 17:24:01 +01:00
error.md Mention core's PanicInfo in error.md. 2024-06-11 15:47:00 +02:00
error.rs Library: Rename "object safe" to "dyn compatible" 2024-10-09 18:48:29 +02:00
escape.rs Optimize escape_ascii 2024-10-09 17:17:50 -04:00
hint.rs Re-do recursive const stability checks 2024-10-25 20:31:40 +02:00
internal_macros.rs Fix doc nits 2024-07-26 13:26:33 +01:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Rollup merge of #132966 - RalfJung:const_option_ext, r=jhpratt 2024-11-12 23:26:45 +01:00
marker.rs Auto merge of #131284 - dingxiangfei2009:rename-smart-ptr-to-coerce-referent, r=compiler-errors 2024-10-27 17:04:12 +00:00
option.rs stabilize const_option_ext 2024-11-12 21:42:15 +01:00
panic.rs add const_eval_select macro to reduce redundancy 2024-11-05 09:26:08 +01:00
panicking.rs add const_eval_select macro to reduce redundancy 2024-11-05 09:26:08 +01:00
pat.rs Add tracking issue to core-pattern-type 2024-08-07 20:43:05 -04:00
pin.rs Rename Receiver -> LegacyReceiver 2024-10-22 12:55:16 +00:00
primitive.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
primitive_docs.rs Rollup merge of #132136 - RalfJung:target-feature-abi-compat, r=Mark-Simulacrum 2024-11-10 10:09:52 +01:00
random.rs random: add tracking issue, address other comments 2024-09-23 10:36:16 +02:00
range.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
result.rs rustdoc-search: simplify rules for generics and type params 2024-10-30 12:27:48 -07:00
time.rs get rid of a whole bunch of unnecessary rustc_const_unstable attributes 2024-11-02 09:59:55 +01:00
tuple.rs update cfgs 2024-09-05 17:24:01 +01:00
ub_checks.rs add const_eval_select macro to reduce redundancy 2024-11-05 09:26:08 +01:00
unit.rs Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00