Remove len < 8 check in longestCommonPrefix

Micro benchmarks look a tiny bit better /shrug
This commit is contained in:
2024-08-02 16:57:32 -07:00
parent 857b402fe2
commit c4443bc355

View File

@@ -1705,10 +1705,6 @@ int longestCommonPrefix(const uint8_t *ap, const uint8_t *bp, int cl) {
int i = 0;
int end;
if (cl < 8) {
goto bytes;
}
// kStride * kUnrollCount at a time
end = cl & ~(kStride * kUnrollFactor - 1);
while (i < end) {
@@ -1749,7 +1745,6 @@ int longestCommonPrefix(const uint8_t *ap, const uint8_t *bp, int cl) {
bp += 8;
}
bytes:
// byte at a time
while (i < cl) {
if (*ap != *bp) {