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

Stop manually SIMDing in swap_nonoverlapping #94212

Merged
merged 1 commit into from
Feb 25, 2022
Merged

Commits on Feb 21, 2022

  1. Stop manually SIMDing in swap_nonoverlapping

    Like I previously did for `reverse`, this leaves it to LLVM to pick how to vectorize it, since it can know better the chunk size to use, compared to the "32 bytes always" approach we currently have.
    
    It does still need logic to type-erase where appropriate, though, as while LLVM is now smart enough to vectorize over slices of things like `[u8; 4]`, it fails to do so over slices of `[u8; 3]`.
    
    As a bonus, this also means one no longer gets the spurious `memcpy`(s?) at the end up swapping a slice of `__m256`s: <https://rust.godbolt.org/z/joofr4v8Y>
    scottmcm committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    8ca47d7 View commit details
    Browse the repository at this point in the history