Repository navigation
Conversation
Dr-Emann
added this pull request to stack #381
October 9, 2026 17:16
Dr-Emann
force-pushed
the
stable_simd_pcmpistrm
branch
from
October 9, 2026 17:22
ea864db to
3efbae2
Compare
Dr-Emann
force-pushed
the
stable_simd_pcmpistrm
branch
from
October 9, 2026 19:05
3efbae2 to
b21d9fd
Compare
Dr-Emann
force-pushed
the
stable_simd_pcmpistrm
branch
from
October 9, 2026 19:20
b21d9fd to
9c10d41
Compare
Following CRoaring, compare a vector of `lhs` against a vector of `rhs` with the SSE4.2 PCMPISTRM instruction via a `fearless_simd::kernel!`. PCMPISTRM treats a zero lane as the end of the string, so the slower PCMPESTRM is used while either current vector may start with a zero (only possible at the start of the sorted arrays). Other SIMD levels keep the portable all-pairs comparison. Compared with the portable comparison, `and`, `and_len` and `sub` are 4-13% faster with default flags and 3-21% faster with `-C target-cpu=native`. Using PCMPESTRM throughout was 0-12% slower.
Dr-Emann
force-pushed
the
stable_simd_pcmpistrm
branch
from
October 9, 2026 19:56
9c10d41 to
51fde93
Compare
Open
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Look ma, no unsafe!
Following CRoaring, compare a vector of
lhsagainst a vector ofrhswith the SSE4.2 PCMPISTRM instruction via afearless_simd::kernel!. PCMPISTRM treats a zero lane as the end of the string, so the slower PCMPESTRM is used while either current vector may start with a zero (only possible at the start of the sorted arrays). Other SIMD levels keep the portable all-pairs comparison.Compared with the portable comparison,
and,and_lenandsubare 4-13% faster with default flags and 3-21% faster with-C target-cpu=native. Using PCMPESTRM throughout was 0-12% slower.