Created
December 2, 2024 14:32
-
-
Save HyperWinX/263099afecf1054cb90095a0142350d6 to your computer and use it in GitHub Desktop.
SSE-accelerated strcmpeq implementation
This file contains 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
global strcmpeq | |
strcmpeq: | |
xor rax, rax | |
xor rdx, rdx | |
.loop: | |
movdqu xmm1, [rdi + rdx] | |
pcmpistri xmm1, [rsi + rdx], 0x18 ; EQUAL_EACH | NEGATIVE_POLARITY | |
jc .diff | |
jz .equal | |
add rdx, 16 | |
jmp .loop | |
.equal: | |
inc eax | |
.diff: | |
ret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment