From c4443bc355f9febe455d6914f44a0a86a9262148 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 2 Aug 2024 16:57:32 -0700 Subject: [PATCH] Remove len < 8 check in longestCommonPrefix Micro benchmarks look a tiny bit better /shrug --- ConflictSet.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 1293251..8f44754 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -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) {