Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve autovectorization of to_lowercase / to_uppercase functions #123778

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 18, 2024

  1. 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 rust-lang#123712
    jhorstmann committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    58b23cb View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    60a13dd View commit details
    Browse the repository at this point in the history