Separation and small optimization. v0.7.1.0

This commit is contained in:
korenkonder
2023-02-12 04:13:59 +03:00
parent f0392bd166
commit df3167787f
197 changed files with 44235 additions and 23661 deletions
+13 -15
View File
@@ -175,21 +175,18 @@ uint32_t hash_murmurhash(const void* data, size_t size,
hash ^= hash >> r;
}
if (size > 0) {
if (size > 1) {
if (size > 2) {
b = d[2];
if (b > 0x60 && b < 0x7B)
b -= 0x20;
hash += b << 16;
}
b = d[1];
if (b > 0x60 && b < 0x7B)
b -= 0x20;
hash += b << 8;
}
switch (size) {
case 3:
b = d[2];
if (b > 0x60 && b < 0x7B)
b -= 0x20;
hash += b << 16;
case 2:
b = d[1];
if (b > 0x60 && b < 0x7B)
b -= 0x20;
hash += b << 8;
case 1:
b = d[0];
if (b > 0x60 && b < 0x7B)
b -= 0x20;
@@ -197,6 +194,7 @@ uint32_t hash_murmurhash(const void* data, size_t size,
hash *= m;
hash ^= hash >> r;
break;
}
}