rust/library/alloc
bors 55cb7359c7 Auto merge of #123778 - jhorstmann:optimize-upper-lower-auto-vectorization, r=the8472
Improve autovectorization of to_lowercase / to_uppercase functions

Refactor the code in the `convert_while_ascii` helper function to make it more suitable for auto-vectorization and also process the full ascii prefix of the string. The generic case conversion logic will only be invoked starting from the first non-ascii character.

The runtime on a microbenchmark with a small ascii-only input decreases from ~55ns to ~18ns per iteration. The new implementation also reduces the amount of unsafe code and encapsulates all unsafe inside the helper function.

Fixes #123712
2024-09-28 23:56:37 +00:00
..
benches Improve autovectorization of to_lowercase / to_uppercase functions 2024-09-23 11:31:29 +02:00
src Auto merge of #123778 - jhorstmann:optimize-upper-lower-auto-vectorization, r=the8472 2024-09-28 23:56:37 +00:00
tests Improve autovectorization of to_lowercase / to_uppercase functions 2024-09-23 11:31:29 +02:00
Cargo.toml Update compiler_builtins to 0.1.130 2024-09-28 11:25:47 -04:00