about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-28 23:56:37 +0000
committerbors <bors@rust-lang.org>2024-09-28 23:56:37 +0000
commit55cb7359c7a43fb084d4717088e4f6ad7d7964f4 (patch)
tree358fc129e0e907778d74f47c74f57a71f5804605 /compiler/rustc_codegen_llvm/src
parented04567ba1d5956d1080fb8121caa005ce059e12 (diff)
parente393f56d37857d3b690b687fe54e8413bb9d5b3a (diff)
downloadrust-55cb7359c7a43fb084d4717088e4f6ad7d7964f4.tar.gz
rust-55cb7359c7a43fb084d4717088e4f6ad7d7964f4.zip
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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions