rust/library
Stuart Cook 1c892e829c
Rollup merge of #147436 - okaneco:eq_ignore_ascii_autovec, r=scottmcm
slice/ascii: Optimize `eq_ignore_ascii_case` with auto-vectorization

- Refactor the current functionality into a helper function
- Use `as_chunks` to encourage auto-vectorization in the optimized chunk processing function
- Add a codegen test checking for vectorization and no panicking
- Add benches for `eq_ignore_ascii_case`

---

The optimized function is initially only enabled for x86_64 which has `sse2` as part of its baseline, but none of the code is platform specific. Other platforms with SIMD instructions may also benefit from this implementation.

Performance improvements only manifest for slices of 16 bytes or longer, so the optimized path is gated behind a length check for greater than or equal to 16.

Benchmarks - Cases below 16 bytes are unaffected, cases above all show sizeable improvements.
```
before:
    str::eq_ignore_ascii_case::bench_large_str_eq         4942.30ns/iter +/- 48.20
    str::eq_ignore_ascii_case::bench_medium_str_eq         632.01ns/iter +/- 16.87
    str::eq_ignore_ascii_case::bench_str_17_bytes_eq        16.28ns/iter  +/- 0.45
    str::eq_ignore_ascii_case::bench_str_31_bytes_eq        35.23ns/iter  +/- 2.28
    str::eq_ignore_ascii_case::bench_str_of_8_bytes_eq       7.56ns/iter  +/- 0.22
    str::eq_ignore_ascii_case::bench_str_under_8_bytes_eq    2.64ns/iter  +/- 0.06
after:
    str::eq_ignore_ascii_case::bench_large_str_eq         611.63ns/iter +/- 28.29
    str::eq_ignore_ascii_case::bench_medium_str_eq         77.10ns/iter +/- 19.76
    str::eq_ignore_ascii_case::bench_str_17_bytes_eq        3.49ns/iter  +/- 0.39
    str::eq_ignore_ascii_case::bench_str_31_bytes_eq        3.50ns/iter  +/- 0.27
    str::eq_ignore_ascii_case::bench_str_of_8_bytes_eq      7.27ns/iter  +/- 0.09
    str::eq_ignore_ascii_case::bench_str_under_8_bytes_eq   2.60ns/iter  +/- 0.05
```
2026-01-27 17:36:35 +11:00
..
alloc Auto merge of #151337 - the8472:bail-before-memcpy2, r=Mark-Simulacrum 2026-01-25 19:45:35 +00:00
alloctests Rollup merge of #151383 - cyrgani:no-internal-deprecation, r=scottmcm 2026-01-27 12:50:52 +11:00
backtrace@28ec93b503 Update backtrace 2026-01-26 10:57:35 +00:00
compiler-builtins compiler-builtins: Enable AArch64 __chkstk for MinGW 2026-01-08 05:01:35 -05:00
core Rollup merge of #147436 - okaneco:eq_ignore_ascii_autovec, r=scottmcm 2026-01-27 17:36:35 +11:00
coretests Rollup merge of #147436 - okaneco:eq_ignore_ascii_autovec, r=scottmcm 2026-01-27 17:36:35 +11:00
panic_abort Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
panic_unwind Fix new function_casts_as_integer lint errors in core, std, panic_unwind and compiler crates 2025-11-10 16:38:28 +01:00
portable-simd Remove more #[must_use] from portable-simd 2025-11-11 13:27:04 -08:00
proc_macro Fix review comments 2026-01-24 14:44:03 +00:00
profiler_builtins Fix profiler_builtins build script to handle full path to profiler lib 2025-04-11 16:57:38 +02:00
rtstartup Update cfg(bootstrap) 2025-07-01 10:55:49 -07:00
rustc-std-workspace-alloc Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
rustc-std-workspace-core Use core via rustc-std-workspace-core in library/panic* 2025-07-31 22:47:24 +00:00
rustc-std-workspace-std Disable unit tests for stdlib packages that don't contain any 2025-07-24 09:15:28 +00:00
std Rollup merge of #151383 - cyrgani:no-internal-deprecation, r=scottmcm 2026-01-27 12:50:52 +11:00
std_detect Replace version placeholders with 1.94 2026-01-20 21:17:10 -05:00
stdarch Revised yield hints 2026-01-24 17:29:25 +00:00
sysroot Remove std_detect_file_io and std_detect_dlsym_getauxval features 2026-01-08 14:50:12 +00:00
test Rollup merge of #151383 - cyrgani:no-internal-deprecation, r=scottmcm 2026-01-27 12:50:52 +11:00
unwind Correct hexagon "unwinder_private_data_size" 2025-12-29 15:21:09 -06:00
windows_link Update windows bindings in std 2026-01-26 10:59:16 +00:00
Cargo.lock Update windows bindings in std 2026-01-26 10:59:16 +00:00
Cargo.toml Update windows bindings in std 2026-01-26 10:59:16 +00:00