Remove len < 8 check in longestCommonPrefix
Micro benchmarks look a tiny bit better /shrug
This commit is contained in:
@@ -1705,10 +1705,6 @@ int longestCommonPrefix(const uint8_t *ap, const uint8_t *bp, int cl) {
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int end;
|
int end;
|
||||||
|
|
||||||
if (cl < 8) {
|
|
||||||
goto bytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
// kStride * kUnrollCount at a time
|
// kStride * kUnrollCount at a time
|
||||||
end = cl & ~(kStride * kUnrollFactor - 1);
|
end = cl & ~(kStride * kUnrollFactor - 1);
|
||||||
while (i < end) {
|
while (i < end) {
|
||||||
@@ -1749,7 +1745,6 @@ int longestCommonPrefix(const uint8_t *ap, const uint8_t *bp, int cl) {
|
|||||||
bp += 8;
|
bp += 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes:
|
|
||||||
// byte at a time
|
// byte at a time
|
||||||
while (i < cl) {
|
while (i < cl) {
|
||||||
if (*ap != *bp) {
|
if (*ap != *bp) {
|
||||||
|
Reference in New Issue
Block a user