From 1b52f704a005d79d00b1260b1e5bc5d6798ff7b6 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 19:41:47 +0300 Subject: Replace scalar loops with SIMD spans, packed stores, and direct wrap-pad checks --- src/compat.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/compat.h') diff --git a/src/compat.h b/src/compat.h index c0ae6fa..dc345d0 100644 --- a/src/compat.h +++ b/src/compat.h @@ -209,10 +209,8 @@ static inline bool term_has_prefix_ci(const char *s, const char *prefix) for (; *prefix; prefix++, s++) { unsigned char a = (unsigned char)*s; unsigned char b = (unsigned char)*prefix; - if (a >= 'A' && a <= 'Z') - a += 'a' - 'A'; - if (b >= 'A' && b <= 'Z') - b += 'a' - 'A'; + a |= ((unsigned)(a - 'A') < 26) ? 0x20 : 0; + b |= ((unsigned)(b - 'A') < 26) ? 0x20 : 0; if (a != b) return false; } -- cgit v1.2.3