about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJörn Horstmann <git@jhorstmann.net>2024-04-10 22:22:18 +0200
committerJörn Horstmann <git@jhorstmann.net>2024-09-23 11:31:29 +0200
commite393f56d37857d3b690b687fe54e8413bb9d5b3a (patch)
tree0b73ce9cb81517c1ffec620db2c1d10f6b6bbbe0 /compiler/rustc_codegen_llvm/src
parent702987f75b74f789ba227ee04a3d7bb1680c2309 (diff)
downloadrust-e393f56d37857d3b690b687fe54e8413bb9d5b3a.tar.gz
rust-e393f56d37857d3b690b687fe54e8413bb9d5b3a.zip
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 microbenchmarks with ascii-only inputs improves between
1.5x for short and 4x for long inputs on x86_64 and aarch64.

The new implementation also encapsulates all unsafe inside the
`convert_while_ascii` function.

Fixes #123712
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions