diff --git a/Hashes.h b/Hashes.h index d2807b6d..235388f9 100644 --- a/Hashes.h +++ b/Hashes.h @@ -305,8 +305,7 @@ inline void MurmurHash1_test ( const void * key, int len, uint32_t seed, void * inline void MurmurHash11_test (const void *key, int len, uint32_t seed, void *out) { - MURMUR11_CTX ctx = seed; - *(uint32_t *)out = MurmurHash11 (key, len, &ctx); + *(uint32_t *)out = MurmurHash11 (key, len, seed); } inline void MurmurHash2_test ( const void * key, int len, uint32_t seed, void * out ) diff --git a/MurmurHash1.cpp b/MurmurHash1.cpp index 8de3a3c8..99e24e5a 100644 --- a/MurmurHash1.cpp +++ b/MurmurHash1.cpp @@ -15,48 +15,147 @@ #include "MurmurHash1.h" #include +#include -static inline uint32_t _wyr4(const uint32_t *p, uint32_t l) { uint32_t v = 0; memcpy(&v, p, l); return v;} +static inline uint32_t +_wyr4 (const uint32_t *p, uint32_t k) +{ + const uint8_t *pb = (const uint8_t *)p; + return (((uint32_t)pb[0]) << 16) | (((uint32_t)pb[k >> 1]) << 8) | pb[k - 1]; +} + +static inline uint32_t +_wyr4_shift (const uint32_t *p, int shift) +{ + const uint8_t *pb = (const uint8_t *)p; + return *(uint32_t *)(pb + shift); +} + +#define murmix1(c1, c2, seed, data) \ + ((c1 ^ seed.Seed.lo ^ data) * (c2 ^ seed.Seed.hi)) +#define murmix2(c1, c2, seed, data1, data2) \ + ((c1 ^ data1 ^ seed.Seed.lo) * (c2 ^ data2 ^ seed.Seed.hi)) uint32_t -MurmurHash11 (const void *key, int len, MURMUR11_CTX *seed) +MurmurHash11 (const void *key, int len, uint32_t s) { - const uint64_t c1 = 0xA263ACD3; - const uint64_t c2 = 0xCD5233A5; - + const uint64_t c1 = 0x8b174952c8e6e651; + const uint64_t c2 = 0xc46257516d31d2ab; + const uint64_t c3 = 0xd9649531d138d397; + const uint64_t c4 = 0xa25d6cdc4d54eacd; + const uint64_t c5 = 0x2b6764ba56c934a3; + + MURMUR11_CTX seed = { s + 1, s - 1}; + const uint32_t *data = (const uint32_t *)key; int len2 = len; - seed->Seed.val = ((c1 ^ seed->Seed.lo) * (c2 ^ len2 ^ seed->Seed.hi)); - while (len >= 8) + if (len <= 16) + { + if (len < 4) + { + if (len != 0) + { + seed.Seed.val = murmix1 (c1, c2, seed, _wyr4 (data, len)); + seed.Seed.val = murmix1 (c2, c4, seed, len); + } + else + { + seed.Seed.val = murmix1 (c2, c4, seed, 0); + } + return seed.Seed.hi ^ seed.Seed.lo; + } + if (len <= 8) + { + seed.Seed.val = murmix2 (c1, c2, seed, data[0], _wyr4_shift(data, len - 4)); + seed.Seed.val = murmix1 (c3, c4, seed, len2); + return seed.Seed.hi ^ seed.Seed.lo; + } + MURMUR11_CTX see1 = seed; + if (len <= 12) + { + seed.Seed.val = murmix2 (c1, c2, seed, data[0], data[1]); + see1.Seed.val = murmix1 (c3, c4, see1, _wyr4_shift (data, len - 4)); + seed.Seed.val ^= see1.Seed.val; + seed.Seed.val = murmix1 (c2, c4, seed, len2); + return seed.Seed.hi ^ seed.Seed.lo; + } + seed.Seed.val = murmix2 (c1, c2, seed, data[0], data[1]); + see1.Seed.val = murmix2 (c3, c4, see1, data[2], _wyr4_shift (data, len - 4)); + seed.Seed.val ^= see1.Seed.val; + seed.Seed.val = murmix1 (c2, c4, seed, len2); + return seed.Seed.hi ^ seed.Seed.lo; + } + if (len >= 32) { + MURMUR11_CTX see1 = seed; + MURMUR11_CTX see2 = seed; + MURMUR11_CTX see3 = seed; + + do + { + + seed.Seed.val = murmix2 (c1, c2, seed, data[0], data[1]); + see1.Seed.val = murmix2 (c3, c4, see1, data[2], data[3]); + see2.Seed.val = murmix2 (c2, c3, see2, data[4], data[5]); + see3.Seed.val = murmix2 (c4, c1, see3, data[6], data[7]); + + data += 8; + len -= 32; + } + while (len >= 32); + seed.Seed.val ^= see1.Seed.val ^ see2.Seed.val ^ see3.Seed.val; + } + if (len >= 24) + { + MURMUR11_CTX see1 = seed; + MURMUR11_CTX see2 = seed; + + seed.Seed.val = murmix2 (c1, c2, seed, data[0], data[1]); + see1.Seed.val = murmix2 (c3, c4, see1, data[2], data[3]); + see2.Seed.val = murmix2 (c2, c3, see2, data[4], data[5]); + data += 6; + len -= 24; + seed.Seed.val ^= see1.Seed.val ^ see2.Seed.val; + } + else if (len >= 16) + { + MURMUR11_CTX see1 = seed; - seed->Seed.val = ((c1 ^ data[0]^ seed->Seed.lo) * (c2 ^ data[1] ^ seed->Seed.hi)); + seed.Seed.val = murmix2 (c1, c2, seed, data[0], data[1]); + see1.Seed.val = murmix2 (c3, c4, see1, data[2], data[3]); + data += 4; + len -= 16; + seed.Seed.val ^= see1.Seed.val; + } + else if (len >= 8) + { + seed.Seed.val = murmix2 (c1, c2, seed, data[0], data[1]); data += 2; len -= 8; - } - if (len >= 4) + } + if (len >= 4) { - seed->Seed.val = ((c1 ^ seed->Seed.lo) * (c2 ^ data[0]^ seed->Seed.hi)); - data ++; + seed.Seed.val = murmix1 (c1, c2, seed, data[0]); + data++; len -= 4; } //---------- if (len != 0) { - uint32_t k = _wyr4(data, len); - seed->Seed.val = ((c1 ^ seed->Seed.lo) * (c2 ^ k ^ seed->Seed.hi)); + seed.Seed.val = murmix1 (c1, c2, seed, _wyr4_shift(data, len - 4)); } - seed->Seed.val = ((c1 ^ seed->Seed.lo) * (c2 ^ len2 ^ seed->Seed.hi)); - - return seed->Seed.hi ^ seed->Seed.lo; -} + seed.Seed.val = murmix1 (c2, c4, seed, len2); + + return seed.Seed.hi ^ seed.Seed.lo; +} //----------------------------------------------------------------------------- // objsize: 0-0x157: 343 -uint32_t MurmurHash1 ( const void * key, int len, uint32_t seed ) +uint32_t +MurmurHash1 (const void *key, int len, uint32_t seed) { const unsigned int m = 0xc6a4a793; @@ -65,35 +164,35 @@ uint32_t MurmurHash1 ( const void * key, int len, uint32_t seed ) unsigned int h = seed ^ (len * m); //---------- - - const unsigned char * data = (const unsigned char *)key; - while(len >= 4) - { - unsigned int k = *(unsigned int *)data; + const unsigned char *data = (const unsigned char *)key; - h += k; - h *= m; - h ^= h >> 16; + while (len >= 4) + { + unsigned int k = *(unsigned int *)data; + + h += k; + h *= m; + h ^= h >> 16; + + data += 4; + len -= 4; + } - data += 4; - len -= 4; - } - //---------- - - switch(len) - { - case 3: - h += data[2] << 16; - case 2: - h += data[1] << 8; - case 1: - h += data[0]; - h *= m; - h ^= h >> r; - }; - + + switch (len) + { + case 3: + h += data[2] << 16; + case 2: + h += data[1] << 8; + case 1: + h += data[0]; + h *= m; + h ^= h >> r; + }; + //---------- h *= m; @@ -102,107 +201,118 @@ uint32_t MurmurHash1 ( const void * key, int len, uint32_t seed ) h ^= h >> 17; return h; -} +} //----------------------------------------------------------------------------- // MurmurHash1Aligned, by Austin Appleby // Same algorithm as MurmurHash1, but only does aligned reads - should be safer -// on certain platforms. +// on certain platforms. // Performance should be equal to or better than the simple version. // objsize: 0x160-0x4e3: 899 -unsigned int MurmurHash1Aligned ( const void * key, int len, unsigned int seed ) +unsigned int +MurmurHash1Aligned (const void *key, int len, unsigned int seed) { const unsigned int m = 0xc6a4a793; const int r = 16; - const unsigned char * data = (const unsigned char *)key; + const unsigned char *data = (const unsigned char *)key; unsigned int h = seed ^ (len * m); int align = (uint64_t)data & 3; - if(align && (len >= 4)) - { - // Pre-load the temp registers - - unsigned int t = 0, d = 0; - - switch(align) - { - case 1: t |= data[2] << 16; - case 2: t |= data[1] << 8; - case 3: t |= data[0]; - } - - t <<= (8 * align); - - data += 4-align; - len -= 4-align; - - int sl = 8 * (4-align); - int sr = 8 * align; - - // Mix - - while(len >= 4) - { - d = *(unsigned int *)data; - t = (t >> sr) | (d << sl); - h += t; - h *= m; - h ^= h >> r; - t = d; - - data += 4; - len -= 4; - } - - // Handle leftover data in temp registers - - int pack = len < align ? len : align; - - d = 0; - - switch(pack) + if (align && (len >= 4)) { - case 3: d |= data[2] << 16; - case 2: d |= data[1] << 8; - case 1: d |= data[0]; - case 0: h += (t >> sr) | (d << sl); - h *= m; - h ^= h >> r; + // Pre-load the temp registers + + unsigned int t = 0, d = 0; + + switch (align) + { + case 1: + t |= data[2] << 16; + case 2: + t |= data[1] << 8; + case 3: + t |= data[0]; + } + + t <<= (8 * align); + + data += 4 - align; + len -= 4 - align; + + int sl = 8 * (4 - align); + int sr = 8 * align; + + // Mix + + while (len >= 4) + { + d = *(unsigned int *)data; + t = (t >> sr) | (d << sl); + h += t; + h *= m; + h ^= h >> r; + t = d; + + data += 4; + len -= 4; + } + + // Handle leftover data in temp registers + + int pack = len < align ? len : align; + + d = 0; + + switch (pack) + { + case 3: + d |= data[2] << 16; + case 2: + d |= data[1] << 8; + case 1: + d |= data[0]; + case 0: + h += (t >> sr) | (d << sl); + h *= m; + h ^= h >> r; + } + + data += pack; + len -= pack; } - - data += pack; - len -= pack; - } else - { - while(len >= 4) { - h += *(unsigned int *)data; - h *= m; - h ^= h >> r; - - data += 4; - len -= 4; + while (len >= 4) + { + h += *(unsigned int *)data; + h *= m; + h ^= h >> r; + + data += 4; + len -= 4; + } } - } //---------- // Handle tail bytes - switch(len) - { - case 3: h += data[2] << 16; - case 2: h += data[1] << 8; - case 1: h += data[0]; + switch (len) + { + case 3: + h += data[2] << 16; + case 2: + h += data[1] << 8; + case 1: + h += data[0]; h *= m; h ^= h >> r; - }; + }; h *= m; h ^= h >> 10; @@ -211,4 +321,3 @@ unsigned int MurmurHash1Aligned ( const void * key, int len, unsigned int seed ) return h; } - diff --git a/MurmurHash1.h b/MurmurHash1.h index 9d2af604..355ea89a 100644 --- a/MurmurHash1.h +++ b/MurmurHash1.h @@ -36,11 +36,12 @@ struct MURMUR11_CTX }; uint64_t val; } Seed; - MURMUR11_CTX (uint32_t seed) : Seed{ seed, seed } {} + MURMUR11_CTX (uint64_t seed) : Seed{ seed } {} + MURMUR11_CTX (uint32_t lo, uint32_t hi) : Seed{ lo, hi} {} }; uint32_t MurmurHash1 ( const void * key, int len, uint32_t seed ); -uint32_t MurmurHash11 (const void *key, int len, MURMUR11_CTX * seed); +uint32_t MurmurHash11 (const void *key, int len, uint32_t seed); uint32_t MurmurHash1Aligned ( const void * key, int len, uint32_t seed ); //----------------------------------------------------------------------------- diff --git a/PythonApplication1/PythonApplication1.py b/PythonApplication1/PythonApplication1.py new file mode 100644 index 00000000..1f5509d3 --- /dev/null +++ b/PythonApplication1/PythonApplication1.py @@ -0,0 +1,69 @@ + +import random +import sympy.ntheory as nt + +def is_prime(num): + if num < 2: + return False + for i in range(2, int(num**0.5) + 1): + if num % i == 0: + return False + return True + +def has_consecutive_ones_or_zeros(num): + # Check if the number has more than 3 consecutive 1s or 0s + count = 1 + prevBit = num & 1 + num >>= 1 + c = 1 + while c <= 64: + curBit = num & 1 + if curBit == prevBit: + count += 1 + if count > 3: + return True + else: + count = 1 + prevBit = curBit + num >>= 1 + c += 1 + return False + +def has_unique_hex_digits(num): + # Check if the number has unique HEX digits + seen_digits = set() + while num > 0: + digit = num & 0xF + (1 << 4) # Extract the last 4 bits (digit) + if digit in seen_digits: + return False + seen_digits.add(digit) + num >>= 5 # Shift right by 4 bits + return True + +def has_no_same_siblings(num): + # Check if the number has unique HEX digits + seen_digits = set() + prevDigit = num & 0xF; + num >>= 4 + while num > 0: + digit = num & 0xF # Extract the last 4 bits (digit) + if digit == prevDigit: + return False + prevDigit = digit + num >>= 4 # Shift right by 4 bits + return True + +def generate_prime_numbers(N): + prime_numbers = [] + c = 0 + while c < N: + candidate = random.getrandbits(64) + candidate = nt.nextprime(candidate); + if has_unique_hex_digits(candidate) and not has_consecutive_ones_or_zeros(candidate) and has_no_same_siblings(candidate): + print(hex(candidate)) + c += 1 + return prime_numbers + +N = 10 # Change this to the desired number of prime numbers +prime_numbers = generate_prime_numbers(N) + \ No newline at end of file diff --git a/PythonApplication1/PythonApplication1.pyproj b/PythonApplication1/PythonApplication1.pyproj new file mode 100644 index 00000000..5ab0b103 --- /dev/null +++ b/PythonApplication1/PythonApplication1.pyproj @@ -0,0 +1,35 @@ + + + Debug + 2.0 + b84482d7-6890-4e41-9b1d-68b70d943282 + . + PythonApplication1.py + + + . + . + PythonApplication1 + PythonApplication1 + + + true + false + + + true + false + + + + + + + + + + + + \ No newline at end of file diff --git a/SLN/INSTALL.vcxproj.user b/SLN/INSTALL.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/SLN/INSTALL.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SLN/RUN_TESTS.vcxproj.user b/SLN/RUN_TESTS.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/SLN/RUN_TESTS.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SLN/SMHasher.sln b/SLN/SMHasher.sln index cde0cdfc..14fad6a3 100644 --- a/SLN/SMHasher.sln +++ b/SLN/SMHasher.sln @@ -1,6 +1,8 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 +VisualStudioVersion = 17.10.35122.118 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ALL_BUILD", "ALL_BUILD.vcxproj", "{D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}" ProjectSection(ProjectDependencies) = postProject {C00C08F3-E6D7-319A-93A6-A8DED71FCB22} = {C00C08F3-E6D7-319A-93A6-A8DED71FCB22} @@ -36,65 +38,134 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TAGS", "TAGS.vcxproj", "{94 EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZERO_CHECK", "ZERO_CHECK.vcxproj", "{D4151A2F-2197-347A-A4CD-C47BFBD114E7}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection +EndProject +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "PythonApplication1", "..\PythonApplication1\PythonApplication1.pyproj", "{B84482D7-6890-4E41-9B1D-68B70D943282}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 - Release|x64 = Release|x64 + MinSizeRel|Any CPU = MinSizeRel|Any CPU MinSizeRel|x64 = MinSizeRel|x64 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + RelWithDebInfo|Any CPU = RelWithDebInfo|Any CPU RelWithDebInfo|x64 = RelWithDebInfo|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Debug|Any CPU.ActiveCfg = Debug|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Debug|Any CPU.Build.0 = Debug|x64 {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Debug|x64.ActiveCfg = Debug|x64 {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Debug|x64.Build.0 = Debug|x64 - {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Release|x64.ActiveCfg = Release|x64 - {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Release|x64.Build.0 = Release|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Release|Any CPU.ActiveCfg = Release|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Release|Any CPU.Build.0 = Release|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Release|x64.ActiveCfg = Release|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.Release|x64.Build.0 = Release|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {D15E99C3-5B8B-32EB-B37E-8977D56FBF1F}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Debug|Any CPU.Build.0 = Debug|x64 {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Debug|x64.ActiveCfg = Debug|x64 - {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Release|x64.ActiveCfg = Release|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Release|Any CPU.ActiveCfg = Release|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Release|Any CPU.Build.0 = Release|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.Release|x64.ActiveCfg = Release|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {33491AC8-D373-3FE9-972B-AFE5A628AB3A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Debug|Any CPU.Build.0 = Debug|x64 {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Debug|x64.ActiveCfg = Debug|x64 - {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Release|x64.ActiveCfg = Release|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Release|Any CPU.ActiveCfg = Release|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Release|Any CPU.Build.0 = Release|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.Release|x64.ActiveCfg = Release|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {A03CFB7C-53F6-3660-8E8D-02FD89A7D6E6}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Debug|Any CPU.Build.0 = Debug|x64 {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Debug|x64.ActiveCfg = Debug|x64 {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Debug|x64.Build.0 = Debug|x64 - {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Release|x64.ActiveCfg = Release|x64 - {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Release|x64.Build.0 = Release|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Release|Any CPU.ActiveCfg = Release|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Release|Any CPU.Build.0 = Release|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Release|x64.ActiveCfg = Release|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.Release|x64.Build.0 = Release|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {C00C08F3-E6D7-319A-93A6-A8DED71FCB22}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Debug|Any CPU.ActiveCfg = Debug|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Debug|Any CPU.Build.0 = Debug|x64 {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Debug|x64.ActiveCfg = Debug|x64 {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Debug|x64.Build.0 = Debug|x64 - {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Release|x64.ActiveCfg = Release|x64 - {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Release|x64.Build.0 = Release|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Release|Any CPU.ActiveCfg = Release|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Release|Any CPU.Build.0 = Release|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Release|x64.ActiveCfg = Release|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.Release|x64.Build.0 = Release|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {1C3D361D-6C2B-3D7F-AB04-7FBCFC533D9D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Debug|Any CPU.ActiveCfg = Debug|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Debug|Any CPU.Build.0 = Debug|x64 {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Debug|x64.ActiveCfg = Debug|x64 - {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Release|x64.ActiveCfg = Release|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Release|Any CPU.ActiveCfg = Release|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Release|Any CPU.Build.0 = Release|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.Release|x64.ActiveCfg = Release|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {9429DCFB-49B8-3B26-8B24-1300C22E6BCC}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Debug|Any CPU.ActiveCfg = Debug|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Debug|Any CPU.Build.0 = Debug|x64 {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Debug|x64.ActiveCfg = Debug|x64 {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Debug|x64.Build.0 = Debug|x64 - {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Release|x64.ActiveCfg = Release|x64 - {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Release|x64.Build.0 = Release|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.MinSizeRel|Any CPU.ActiveCfg = MinSizeRel|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.MinSizeRel|Any CPU.Build.0 = MinSizeRel|x64 {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.MinSizeRel|x64.ActiveCfg = MinSizeRel|x64 {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.MinSizeRel|x64.Build.0 = MinSizeRel|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Release|Any CPU.ActiveCfg = Release|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Release|Any CPU.Build.0 = Release|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Release|x64.ActiveCfg = Release|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.Release|x64.Build.0 = Release|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|x64 + {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|x64 {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {D4151A2F-2197-347A-A4CD-C47BFBD114E7}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 + {B84482D7-6890-4E41-9B1D-68B70D943282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.Debug|x64.ActiveCfg = Debug|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.Release|x64.ActiveCfg = Release|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU + {B84482D7-6890-4E41-9B1D-68B70D943282}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A4369B72-0C59-383F-AB54-A534141966BC} EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection EndGlobal diff --git a/SLN/SMHasher.vcxproj b/SLN/SMHasher.vcxproj index 45b695f8..1989ca3a 100644 --- a/SLN/SMHasher.vcxproj +++ b/SLN/SMHasher.vcxproj @@ -33,25 +33,25 @@ Application MultiByte - v143 + Intel C++ Compiler 2024 true Application MultiByte - v143 + Intel C++ Compiler 2024 true Application MultiByte - v143 + Intel C++ Compiler 2024 true Application MultiByte - v143 + Intel C++ Compiler 2024 true @@ -72,7 +72,6 @@ SMHasher.dir\Release\ SMHasher .exe - true C:\Users\JKS\source\repos\zhenkas\smhasher\SLN\MinSizeRel\ SMHasher.dir\MinSizeRel\ SMHasher @@ -132,21 +131,20 @@ $(IntDir) - AdvancedVectorExtensions512 + AdvancedVectorExtensions2 Sync NotUsing - true false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;LTO;NDEBUG;HAVE_SSE2;HAVE_SSE42;HAVE_AESNI;HAVE_SHANI;HAVE_CLMUL;HAVE_INT64;HAVE_ALIGNED_ACCESS_REQUIRED;NCPU=32;CMAKE_INTDIR="Release" + %(PreprocessorDefinitions);WIN32;_WINDOWS;LTO;NDEBUG;HAVE_SSE2;HAVE_SSE42;HAVE_SHANI;HAVE_CLMUL;HAVE_INT64;HAVE_ALIGNED_ACCESS_REQUIRED;NCPU=32;CMAKE_INTDIR="Release" $(IntDir) - false stdcpplatest AnySuitable true Speed + AVX2 + Full %(PreprocessorDefinitions);WIN32;_WINDOWS;LTO;NDEBUG;HAVE_SSE2;HAVE_SSE42;HAVE_AESNI;HAVE_SHANI;HAVE_CLMUL;HAVE_INT64;HAVE_ALIGNED_ACCESS_REQUIRED;NCPU=32;CMAKE_INTDIR=\"Release\" @@ -160,18 +158,11 @@ %(Filename)_p.c - Release\SMHasherSupport.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - %(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 - false - %(IgnoreSpecificDefaultLibraries) - C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.lib - C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.pdb Console + true - - false - + diff --git a/SLN/SMHasher.vcxproj.user b/SLN/SMHasher.vcxproj.user index 114726a8..61350c7e 100644 --- a/SLN/SMHasher.vcxproj.user +++ b/SLN/SMHasher.vcxproj.user @@ -1,7 +1,7 @@  - --test=PerlinNoise,MomentChi2,Avalanche,Permutations Murmur11 + --test=Zeroes Murmur11 WindowsLocalDebugger diff --git a/SLN/SMHasherSupport.vcxproj b/SLN/SMHasherSupport.vcxproj index 89fca7ad..db673e09 100644 --- a/SLN/SMHasherSupport.vcxproj +++ b/SLN/SMHasherSupport.vcxproj @@ -39,7 +39,7 @@ StaticLibrary MultiByte - v143 + Intel C++ Compiler 2024 true @@ -119,21 +119,19 @@ $(IntDir) - AdvancedVectorExtensions512 + AdvancedVectorExtensions2 Sync NotUsing - true false - Level3 - %(PreprocessorDefinitions);WIN32;_WINDOWS;LTO;NDEBUG;HAVE_SSE2;HAVE_SSE42;HAVE_AESNI;HAVE_SHANI;HAVE_CLMUL;HAVE_INT64;HAVE_ALIGNED_ACCESS_REQUIRED;NCPU=32;CMAKE_INTDIR="Release" + %(PreprocessorDefinitions);WIN32;_WINDOWS;LTO;NDEBUG;HAVE_SSE2;HAVE_SSE42;HAVE_SHANI;HAVE_CLMUL;HAVE_INT64;HAVE_ALIGNED_ACCESS_REQUIRED;NCPU=32;CMAKE_INTDIR="Release" $(IntDir) - false stdcpplatest AnySuitable true Speed + -maes -msha %(AdditionalOptions) %(PreprocessorDefinitions);WIN32;_WINDOWS;LTO;NDEBUG;HAVE_SSE2;HAVE_SSE42;HAVE_AESNI;HAVE_SHANI;HAVE_CLMUL;HAVE_INT64;HAVE_ALIGNED_ACCESS_REQUIRED;NCPU=32;CMAKE_INTDIR=\"Release\" diff --git a/SLN/TAGS.vcxproj.user b/SLN/TAGS.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/SLN/TAGS.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/SLN/Testing/Temporary/CTestCostData.txt b/SLN/Testing/Temporary/CTestCostData.txt new file mode 100644 index 00000000..f1e57f42 --- /dev/null +++ b/SLN/Testing/Temporary/CTestCostData.txt @@ -0,0 +1,8 @@ +VerifyAll 0 0 +Sanity 1 0.929598 +Speed 1 3.76754 +Cyclic 1 2.51264 +Zeroes 1 0.270016 +Seed 1 1.71512 +--- +VerifyAll diff --git a/SLN/Testing/Temporary/LastTest.log b/SLN/Testing/Temporary/LastTest.log new file mode 100644 index 00000000..7ba77973 --- /dev/null +++ b/SLN/Testing/Temporary/LastTest.log @@ -0,0 +1,429 @@ +Start testing: Aug 30 00:47 Jerusalem Daylight Time +---------------------------------------------------------- +1/6 Testing: VerifyAll +1/6 Test: VerifyAll +Command: "C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.exe" "--test=VerifyAll" +Directory: C:/Users/JKS/source/repos/zhenkas/smhasher/SLN +"VerifyAll" start time: Aug 30 00:47 Jerusalem Daylight Time +Output: +---------------------------------------------------------- +[[[ VerifyAll Tests ]]] + +Self-test FAILED! + donothing32 - Verification value 0x00000000 ....... INSECURE (should not be 0) + donothing64 - Verification value 0x00000000 ....... INSECURE (should not be 0) + donothing128 - Verification value 0x00000000 ....... INSECURE (should not be 0) + NOP_OAAT_read64 - Verification value 0x00000000 ....... INSECURE (should not be 0) + BadHash - Verification value 0xAB432E23 ....... PASS + sumhash - Verification value 0x0000A9AC ....... PASS + sumhash32 - Verification value 0x3D6DC280 ....... PASS + multiply_shift - Verification value 0xFCE355A6 ....... PASS + pair_multiply_shift - Verification value 0xD4B20347 ....... PASS + crc32 - Verification value 0x3719DB20 ....... PASS + md5-128 - Verification value 0xF263F96F ....... PASS + md5_64 - Verification value 0x12F0BA8E ....... PASS + md5_32 - Verification value 0xF3DFF19F ....... PASS + sha1-160 - Verification value 0xED2F35E4 ....... PASS + sha1_32 - Verification value 0x480A2B09 ....... SKIP (self- or unseeded) + sha1_64 - Verification value 0x296A3B95 ....... SKIP (self- or unseeded) + sha2-224 - Verification value 0x407AA518 ....... PASS + sha2-224_64 - Verification value 0xF3E40ECA ....... PASS + sha2-256 - Verification value 0xEBDA2FB1 ....... PASS + sha2-256_64 - Verification value 0xC1C4FA72 ....... PASS + sha1ni - Verification value 0x375755A4 ....... PASS + sha1ni_32 - Verification value 0xE70686CC ....... PASS + sha2ni-256 - Verification value 0x4E3BB25E ....... PASS + sha2ni-256_64 - Verification value 0xF938E80E ....... PASS + rmd128 - Verification value 0xFF576977 ....... PASS + rmd160 - Verification value 0x30B37AC6 ....... PASS + rmd256 - Verification value 0xEB16FAD7 ....... PASS + edonr224 - Verification value 0x83A8E7AB ....... PASS + edonr256 - Verification value 0x06DD4F96 ....... PASS + blake3_c - Verification value 0x50E4CD91 ....... PASS + blake2s-128 - Verification value 0xE8D8FCDF ....... PASS + blake2s-160 - Verification value 0xD50FF144 ....... PASS + blake2s-224 - Verification value 0x19B36D2C ....... PASS + blake2s-256 - Verification value 0x841D6354 ....... PASS + blake2s-256_64 - Verification value 0x53000BB2 ....... PASS + blake2b-160 - Verification value 0x28ADDA30 ....... PASS + blake2b-224 - Verification value 0x101A62A4 ....... PASS + blake2b-256 - Verification value 0xC9D8D995 ....... PASS + blake2b-256_64 - Verification value 0xCF4F7EC3 ....... PASS + asconhashv12 - Verification value 0xA969C160 ....... PASS + asconhashv12_64 - Verification value 0xE7DEF300 ....... PASS + sha3-256 - Verification value 0x21048CE3 ....... PASS + sha3-256_64 - Verification value 0xE62E5CC0 ....... PASS + hasshe2 - Verification value 0xF5D39DFE ....... PASS + poly_1_mersenne - Verification value 0x00000000 ....... INSECURE (should not be 0) + poly_2_mersenne - Verification value 0x00000000 ....... INSECURE (should not be 0) + poly_3_mersenne - Verification value 0x00000000 ....... INSECURE (should not be 0) + poly_4_mersenne - Verification value 0x00000000 ....... INSECURE (should not be 0) + tabulation - Verification value 0x320F17C5 ....... FAIL! (Expected 0xb49c607c) + tabulation32 - Verification value 0x3C3B7BDD ....... PASS + crc32_hw - Verification value 0x0C7346F0 ....... FAIL! (Expected 0xc2b84071) + crc64_hw - Verification value 0xE7C3FD0E ....... FAIL! (Expected 0x6bbc19d6) + crc64_jones1 - Verification value 0x7DC1B496 ....... PASS + crc64_jones2 - Verification value 0x7DC1B496 ....... PASS + crc64_jones3 - Verification value 0x7DC1B496 ....... PASS + crc64_jones - Verification value 0x7DC1B496 ....... PASS + o1hash - Verification value 0x85051E87 ....... PASS + fibonacci - Verification value 0xFE3BD380 ....... PASS + FNV1a - Verification value 0xE3CBBE91 ....... PASS + FNV1A_Totenschiff - Verification value 0x95D95ACF ....... PASS + FNV1A_Pippip_Yurii - Verification value 0xE79AE3E4 ....... PASS + FNV1a_YT - Verification value 0xD8AFFD71 ....... PASS + FNV64 - Verification value 0x103455FC ....... PASS + FNV128 - Verification value 0xBCAA1426 ....... PASS + FNV2 - Verification value 0x1967C625 ....... PASS + fletcher2 - Verification value 0x890767C0 ....... PASS + fletcher4 - Verification value 0x890767C0 ....... PASS + bernstein - Verification value 0xBDB4B640 ....... PASS + sdbm - Verification value 0x582AF769 ....... PASS + x17 - Verification value 0x8128E14C ....... PASS + libiberty - Verification value 0x584FBC20 ....... PASS + gcc - Verification value 0xC6239327 ....... PASS + JenkinsOOAT - Verification value 0x83E133DA ....... PASS + JenkinsOOAT_perl - Verification value 0xEE05869B ....... PASS + pearsonbhash64 - Verification value 0xB6FF2DFC ....... PASS + pearsonbhash128 - Verification value 0x6BEFE6EA ....... PASS + pearsonbhash256 - Verification value 0x999B3C19 ....... PASS + VHASH_32 - Verification value 0xF0077651 ....... PASS + VHASH_64 - Verification value 0xF97D84FE ....... PASS + MicroOAAT - Verification value 0x16F1BA97 ....... PASS + farsh32 - Verification value 0xBCDE332C ....... PASS + farsh64 - Verification value 0xDE2FDAEE ....... PASS + farsh128 - Verification value 0x82B6CBEC ....... PASS + farsh256 - Verification value 0xFEBEA0BC ....... PASS + jodyhash32 - Verification value 0xA2AEFC60 ....... PASS + jodyhash64 - Verification value 0xC1CBFA34 ....... PASS + lookup3 - Verification value 0x3D83917A ....... PASS + superfast - Verification value 0x0C80403A ....... PASS + MurmurOAAT - Verification value 0x5363BD98 ....... PASS + Crap8 - Verification value 0x743E97A1 ....... PASS + xxHash32 - Verification value 0xBA88B743 ....... PASS + Murmur1 - Verification value 0x9EA7D056 ....... PASS + Murmur11 - Verification value 0x18F2C87B ....... FAIL! (Expected 0x51d22835) + Murmur2 - Verification value 0x27864C1E ....... PASS + Murmur2A - Verification value 0x7FBD4396 ....... PASS + Murmur2B - Verification value 0x1F0D3804 ....... PASS + Murmur2C - Verification value 0xDD537C05 ....... PASS + Murmur3A - Verification value 0xB0F57EE3 ....... PASS + PMurHash32 - Verification value 0xB0F57EE3 ....... PASS + Murmur3C - Verification value 0xB3ECE62A ....... PASS + PMPML_32 - Verification value 0xEAE2E3CC ....... PASS + PMPML_64 - Verification value 0x584CC9DF ....... PASS + City32 - Verification value 0xEDED9084 ....... PASS + metrohash64 - Verification value 0x6FA828C9 ....... PASS + metrohash64_1 - Verification value 0xEE88F7D2 ....... PASS + metrohash64_2 - Verification value 0xE1FC7C6E ....... PASS + metrohash128 - Verification value 0x4A6673E7 ....... PASS + metrohash128_1 - Verification value 0x20E8A1D7 ....... PASS + metrohash128_2 - Verification value 0x5437C684 ....... PASS + City64noSeed - Verification value 0x4C4E54B1 ....... PASS + City64 - Verification value 0x5FABC5C5 ....... PASS + t1ha1_64le - Verification value 0xD6836381 ....... PASS + t1ha1_64be - Verification value 0x93F864DE ....... PASS + t1ha0_32le - Verification value 0x7F7D7B29 ....... PASS + t1ha0_32be - Verification value 0xDA6A4061 ....... PASS + tifuhash_64 - Verification value 0x823D51B6 ....... FAIL! (Expected 0x644236d4) + beamsplitter - Verification value 0x1BDF358B ....... PASS + discohash1 - Verification value 0xBEBB4185 ....... PASS + discohash1-128 - Verification value 0x05C0460C ....... PASS + discohash2 - Verification value 0x8FF45ABF ....... PASS + discohash2-128 - Verification value 0x95E58C14 ....... PASS + discoNONG - Verification value 0x9182A886 ....... PASS + fasthash32 - Verification value 0xE9481AFC ....... PASS + fasthash64 - Verification value 0xA16231A7 ....... PASS + floppsyhash - Verification value 0x7FF80000 ....... SKIP (self- or unseeded) + chaskey - Verification value 0x84B3764E ....... FAIL! (Expected 0x81a90131) + SipHash - Verification value 0xC58D7F9C ....... PASS + HalfSipHash - Verification value 0xA7A05F72 ....... PASS + GoodOAAT - Verification value 0x7B14EEE5 ....... PASS + prvhash64_64m - Verification value 0xD37C7E74 ....... PASS + prvhash64_64 - Verification value 0xD37C7E74 ....... PASS + prvhash64_128 - Verification value 0xB447480F ....... PASS + prvhash64s_64 - Verification value 0x891521D6 ....... PASS + prvhash64s_128 - Verification value 0x0199728A ....... PASS + SipHash13 - Verification value 0x29C010BF ....... PASS + clhash - Verification value 0xFF27B919 ....... SKIP (self- or unseeded) + Murmur3F - Verification value 0x6384BA69 ....... PASS + MUM - Verification value 0xA973C6C0 ....... PASS + MUMlow - Verification value 0x7F898826 ....... PASS + xmsx32 - Verification value 0x6B54E1D4 ....... PASS + mirhash - Verification value 0x00A393C8 ....... FAIL! (Expected 0x422a66fc) + mirhash32low - Verification value 0xE320CE68 ....... FAIL! (Expected 0xd50d1f09) + mirhashstrict - Verification value 0x422A66FC ....... PASS + mirhashstrict32low - Verification value 0xD50D1F09 ....... PASS + City64low - Verification value 0x6C4EF416 ....... PASS + City128 - Verification value 0x305C0D9A ....... PASS + CityCrc128 - Verification value 0x98C09AB4 ....... PASS + CityCrc256 - Verification value 0x2A7036C8 ....... PASS + FarmHash32 - Verification value 0x47AB39AF ....... SKIP (self- or unseeded) + FarmHash64 - Verification value 0xEBC4A679 ....... PASS + FarmHash128 - Verification value 0x305C0D9A ....... PASS + farmhash32_c - Verification value 0x47AB39AF ....... SKIP (self- or unseeded) + farmhash64_c - Verification value 0xEBC4A679 ....... PASS + farmhash128_c - Verification value 0x305C0D9A ....... PASS + xxHash64 - Verification value 0x024B7CF4 ....... PASS + Spooky32 - Verification value 0x3F798BBB ....... PASS + Spooky64 - Verification value 0xA7F955F1 ....... PASS + Spooky128 - Verification value 0x8D263080 ....... PASS + SpookyV2_32 - Verification value 0xA48BE265 ....... PASS + SpookyV2_64 - Verification value 0x972C4BDC ....... PASS + SpookyV2_128 - Verification value 0x893CFCBE ....... PASS + pengyhash - Verification value 0x1FC2217B ....... PASS + mx3 - Verification value 0x4DB51E5B ....... PASS + halftime_hash64 - Verification value 0x55F2A08F ....... SKIP (self- or unseeded) + halftime_hash128 - Verification value 0x43EEC3D3 ....... SKIP (self- or unseeded) + halftime_hash256 - Verification value 0x554BF6A9 ....... SKIP (self- or unseeded) + halftime_hash512 - Verification value 0x0EB4F87B ....... SKIP (self- or unseeded) + t1ha2_atonce - Verification value 0x8F16C948 ....... PASS + t1ha2_stream - Verification value 0xDED9B580 ....... PASS + t1ha2_atonce128 - Verification value 0xB44C43A1 ....... PASS + t1ha2_stream128 - Verification value 0xE929E756 ....... PASS + xxh3 - Verification value 0x39CD9E4A ....... PASS + xxh3low - Verification value 0xFAE8467B ....... PASS + xxh128 - Verification value 0xEB61B3A0 ....... PASS + xxh128low - Verification value 0x54D1CC70 ....... PASS + wyhash32low - Verification value 0xC5DF9AA0 ....... PASS + wyhash - Verification value 0x9DAE7DD3 ....... PASS + rapidhash - Verification value 0xAF404C4B ....... PASS + rapidhash_unrolled - Verification value 0xAF404C4B ....... PASS + nmhash32 - Verification value 0x12A30553 ....... PASS + nmhash32x - Verification value 0xA8580227 ....... PASS + komihash - Verification value 0x8157FF6D ....... PASS + polymur - Verification value 0x4F894810 ....... PASS + +Test time = 0.16 sec +---------------------------------------------------------- +Test Failed. +"VerifyAll" end time: Aug 30 00:47 Jerusalem Daylight Time +"VerifyAll" time elapsed: 00:00:00 +---------------------------------------------------------- + +2/6 Testing: Sanity +2/6 Test: Sanity +Command: "C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.exe" "--test=Sanity" +Directory: C:/Users/JKS/source/repos/zhenkas/smhasher/SLN +"Sanity" start time: Aug 30 00:47 Jerusalem Daylight Time +Output: +---------------------------------------------------------- +--- Testing xxh3 "xxHash v3, 64-bit" GOOD + +[[[ Sanity Tests ]]] + +Verification value 0x39CD9E4A ....... PASS +Running sanity check 1 .......... PASS +Running AppendedZeroesTest .......... PASS + + +Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001 +Verification value is 0x00000001 - Testing took 0.919000 seconds + +Test time = 0.93 sec +---------------------------------------------------------- +Test Passed. +"Sanity" end time: Aug 30 00:47 Jerusalem Daylight Time +"Sanity" time elapsed: 00:00:00 +---------------------------------------------------------- + +3/6 Testing: Speed +3/6 Test: Speed +Command: "C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.exe" "--test=Speed" +Directory: C:/Users/JKS/source/repos/zhenkas/smhasher/SLN +"Speed" start time: Aug 30 00:47 Jerusalem Daylight Time +Output: +---------------------------------------------------------- +--- Testing xxh3 "xxHash v3, 64-bit" GOOD + +[[[ Speed Tests ]]] + +Bulk speed test - 262144-byte keys +Alignment 7 - 22.071 bytes/cycle - 63147.05 MiB/sec @ 3 ghz +Alignment 6 - 21.914 bytes/cycle - 62696.93 MiB/sec @ 3 ghz +Alignment 5 - 21.922 bytes/cycle - 62719.73 MiB/sec @ 3 ghz +Alignment 4 - 22.182 bytes/cycle - 63463.96 MiB/sec @ 3 ghz +Alignment 3 - 22.010 bytes/cycle - 62972.49 MiB/sec @ 3 ghz +Alignment 2 - 21.705 bytes/cycle - 62099.15 MiB/sec @ 3 ghz +Alignment 1 - 21.744 bytes/cycle - 62210.44 MiB/sec @ 3 ghz +Alignment 0 - 23.906 bytes/cycle - 68396.16 MiB/sec @ 3 ghz +Average - 22.182 bytes/cycle - 63463.24 MiB/sec @ 3 ghz + +Small key speed test - 1-byte keys - 18.00 cycles/hash +Small key speed test - 2-byte keys - 18.00 cycles/hash +Small key speed test - 3-byte keys - 18.00 cycles/hash +Small key speed test - 4-byte keys - 20.00 cycles/hash +Small key speed test - 5-byte keys - 20.00 cycles/hash +Small key speed test - 6-byte keys - 20.00 cycles/hash +Small key speed test - 7-byte keys - 20.00 cycles/hash +Small key speed test - 8-byte keys - 20.00 cycles/hash +Small key speed test - 9-byte keys - 17.99 cycles/hash +Small key speed test - 10-byte keys - 17.98 cycles/hash +Small key speed test - 11-byte keys - 17.99 cycles/hash +Small key speed test - 12-byte keys - 17.98 cycles/hash +Small key speed test - 13-byte keys - 17.98 cycles/hash +Small key speed test - 14-byte keys - 17.97 cycles/hash +Small key speed test - 15-byte keys - 17.98 cycles/hash +Small key speed test - 16-byte keys - 17.98 cycles/hash +Small key speed test - 17-byte keys - 19.00 cycles/hash +Small key speed test - 18-byte keys - 19.27 cycles/hash +Small key speed test - 19-byte keys - 19.00 cycles/hash +Small key speed test - 20-byte keys - 19.00 cycles/hash +Small key speed test - 21-byte keys - 19.31 cycles/hash +Small key speed test - 22-byte keys - 19.33 cycles/hash +Small key speed test - 23-byte keys - 19.30 cycles/hash +Small key speed test - 24-byte keys - 19.16 cycles/hash +Small key speed test - 25-byte keys - 19.34 cycles/hash +Small key speed test - 26-byte keys - 19.28 cycles/hash +Small key speed test - 27-byte keys - 19.30 cycles/hash +Small key speed test - 28-byte keys - 19.30 cycles/hash +Small key speed test - 29-byte keys - 19.00 cycles/hash +Small key speed test - 30-byte keys - 19.00 cycles/hash +Small key speed test - 31-byte keys - 19.43 cycles/hash +Average 18.899 cycles/hash + + +Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001 +Verification value is 0x00000001 - Testing took 3.759000 seconds + +Test time = 3.77 sec +---------------------------------------------------------- +Test Passed. +"Speed" end time: Aug 30 00:47 Jerusalem Daylight Time +"Speed" time elapsed: 00:00:03 +---------------------------------------------------------- + +4/6 Testing: Cyclic +4/6 Test: Cyclic +Command: "C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.exe" "--test=Cyclic" +Directory: C:/Users/JKS/source/repos/zhenkas/smhasher/SLN +"Cyclic" start time: Aug 30 00:47 Jerusalem Daylight Time +Output: +---------------------------------------------------------- +--- Testing xxh3 "xxHash v3, 64-bit" GOOD + +[[[ Keyset 'Cyclic' Tests ]]] + +Keyset 'Cyclic' - 8 cycles of 8 bytes - 1000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 116.4, actual 125 (1.07x) (9) +Testing collisions (high 23-34 bits) - Worst is 34 bits: 37/29 (1.27x) +Testing collisions (low 32-bit) - Expected 116.4, actual 107 (0.92x) +Testing collisions (low 23-34 bits) - Worst is 23 bits: 57758/57305 (1.01x) +Testing distribution - Worst bias is the 17-bit window at bit 22 - 0.126% + +Keyset 'Cyclic' - 8 cycles of 9 bytes - 1000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 116.4, actual 110 (0.94x) +Testing collisions (high 23-34 bits) - Worst is 23 bits: 57337/57305 (1.00x) +Testing collisions (low 32-bit) - Expected 116.4, actual 116 (1.00x) +Testing collisions (low 23-34 bits) - Worst is 31 bits: 243/232 (1.04x) +Testing distribution - Worst bias is the 17-bit window at bit 18 - 0.179% + +Keyset 'Cyclic' - 8 cycles of 10 bytes - 1000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 116.4, actual 126 (1.08x) (10) +Testing collisions (high 23-34 bits) - Worst is 33 bits: 66/58 (1.13x) +Testing collisions (low 32-bit) - Expected 116.4, actual 124 (1.07x) (8) +Testing collisions (low 23-34 bits) - Worst is 31 bits: 276/232 (1.19x) +Testing distribution - Worst bias is the 17-bit window at bit 14 - 0.111% + +Keyset 'Cyclic' - 8 cycles of 11 bytes - 1000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 116.4, actual 135 (1.16x) (19) +Testing collisions (high 23-34 bits) - Worst is 34 bits: 40/29 (1.37x) +Testing collisions (low 32-bit) - Expected 116.4, actual 135 (1.16x) (19) +Testing collisions (low 23-34 bits) - Worst is 33 bits: 78/58 (1.34x) +Testing distribution - Worst bias is the 17-bit window at bit 40 - 0.143% + +Keyset 'Cyclic' - 8 cycles of 12 bytes - 1000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 116.4, actual 120 (1.03x) (4) +Testing collisions (high 23-34 bits) - Worst is 33 bits: 65/58 (1.12x) +Testing collisions (low 32-bit) - Expected 116.4, actual 108 (0.93x) +Testing collisions (low 23-34 bits) - Worst is 34 bits: 34/29 (1.17x) +Testing distribution - Worst bias is the 17-bit window at bit 48 - 0.167% + +Keyset 'Cyclic' - 8 cycles of 16 bytes - 1000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 116.4, actual 114 (0.98x) +Testing collisions (high 23-34 bits) - Worst is 26 bits: 7495/7413 (1.01x) +Testing collisions (low 32-bit) - Expected 116.4, actual 110 (0.94x) +Testing collisions (low 23-34 bits) - Worst is 34 bits: 32/29 (1.10x) +Testing distribution - Worst bias is the 17-bit window at bit 28 - 0.080% + + + +Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001 +Verification value is 0x00000001 - Testing took 2.504000 seconds + +Test time = 2.51 sec +---------------------------------------------------------- +Test Passed. +"Cyclic" end time: Aug 30 00:47 Jerusalem Daylight Time +"Cyclic" time elapsed: 00:00:02 +---------------------------------------------------------- + +5/6 Testing: Zeroes +5/6 Test: Zeroes +Command: "C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.exe" "--test=Zeroes" +Directory: C:/Users/JKS/source/repos/zhenkas/smhasher/SLN +"Zeroes" start time: Aug 30 00:47 Jerusalem Daylight Time +Output: +---------------------------------------------------------- +--- Testing xxh3 "xxHash v3, 64-bit" GOOD + +[[[ Keyset 'Zeroes' Tests ]]] + +Keyset 'Zeroes' - 204800 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 4.9, actual 1 (0.20x) +Testing collisions (high 21-29 bits) - Worst is 22 bits: 4848/4919 (0.99x) +Testing collisions (low 32-bit) - Expected 4.9, actual 6 (1.23x) (2) +Testing collisions (low 21-29 bits) - Worst is 27 bits: 175/156 (1.12x) +Testing distribution - Worst bias is the 15-bit window at bit 48 - 0.332% + + + +Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001 +Verification value is 0x00000001 - Testing took 0.262000 seconds + +Test time = 0.27 sec +---------------------------------------------------------- +Test Passed. +"Zeroes" end time: Aug 30 00:47 Jerusalem Daylight Time +"Zeroes" time elapsed: 00:00:00 +---------------------------------------------------------- + +6/6 Testing: Seed +6/6 Test: Seed +Command: "C:/Users/JKS/source/repos/zhenkas/smhasher/SLN/Release/SMHasher.exe" "--test=Seed" +Directory: C:/Users/JKS/source/repos/zhenkas/smhasher/SLN +"Seed" start time: Aug 30 00:47 Jerusalem Daylight Time +Output: +---------------------------------------------------------- +--- Testing xxh3 "xxHash v3, 64-bit" GOOD + +[[[ Keyset 'Seed' Tests ]]] + +Keyset 'Seed' - 5000000 keys +Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x) +Testing collisions (high 32-bit) - Expected 2909.3, actual 2931 (1.01x) (22) +Testing collisions (high 26-39 bits) - Worst is 38 bits: 51/45 (1.12x) +Testing collisions (low 32-bit) - Expected 2909.3, actual 2936 (1.01x) (27) +Testing collisions (low 26-39 bits) - Worst is 37 bits: 99/90 (1.09x) +Testing distribution - Worst bias is the 19-bit window at bit 55 - 0.054% + + + +Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001 +Verification value is 0x00000001 - Testing took 1.707000 seconds + +Test time = 1.72 sec +---------------------------------------------------------- +Test Passed. +"Seed" end time: Aug 30 00:47 Jerusalem Daylight Time +"Seed" time elapsed: 00:00:01 +---------------------------------------------------------- + +End testing: Aug 30 00:47 Jerusalem Daylight Time diff --git a/SLN/Testing/Temporary/LastTestsFailed.log b/SLN/Testing/Temporary/LastTestsFailed.log new file mode 100644 index 00000000..8473079a --- /dev/null +++ b/SLN/Testing/Temporary/LastTestsFailed.log @@ -0,0 +1 @@ +1:VerifyAll diff --git a/SLN/ZERO_CHECK.vcxproj.user b/SLN/ZERO_CHECK.vcxproj.user new file mode 100644 index 00000000..88a55094 --- /dev/null +++ b/SLN/ZERO_CHECK.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/main.cpp b/main.cpp index e6790081..1154f29c 100644 --- a/main.cpp +++ b/main.cpp @@ -328,7 +328,7 @@ HashInfo g_hashes[] = { Crap8_test, 32, 0x743E97A1, "Crap8", "Crap8", POOR, {/*0x83d2e73b, 0x97e1cc59*/} }, { xxHash32_test, 32, 0xBA88B743, "xxHash32", "xxHash, 32-bit for x86", POOR, {} }, { MurmurHash1_test, 32, 0x9EA7D056, "Murmur1", "MurmurHash1", POOR, {0xc6a4a793} /* !! */ }, -{ MurmurHash11_test, 32, 0x51D22835, "Murmur11", "MurmurHash11", POOR, {0xc6a4a793} /* !! */ }, +{ MurmurHash11_test, 32, 0x0D770CF7, "Murmur11", "MurmurHash11", POOR, {0xc6a4a793} /* !! */ }, { MurmurHash2_test, 32, 0x27864C1E, "Murmur2", "MurmurHash2 for x86, 32-bit", POOR, {0x10} /* !! */ }, { MurmurHash2A_test, 32, 0x7FBD4396, "Murmur2A", "MurmurHash2A for x86, 32-bit", POOR, @@ -2797,3 +2797,13 @@ int main ( int argc, const char ** argv ) fflush(NULL); return 0; } + + +extern "C" +{ + unsigned long long __umodti3 (unsigned long long a, unsigned long long b) + { + return a % b; + } +} + diff --git a/pearson_hash/portable_endian.h b/pearson_hash/portable_endian.h index 8041804b..90e4c265 100644 --- a/pearson_hash/portable_endian.h +++ b/pearson_hash/portable_endian.h @@ -121,9 +121,9 @@ #elif defined(__WINDOWS__) -# ifdef __MINGW32__ +//# ifdef __MINGW32__ # include -# endif +//# endif # if BYTE_ORDER == LITTLE_ENDIAN diff --git a/t1ha.h b/t1ha.h index 1be20941..fa0acf66 100644 --- a/t1ha.h +++ b/t1ha.h @@ -224,6 +224,7 @@ #include #endif +#include /*****************************************************************************/ #if defined(i386) || defined(__386) || defined(__i386) || defined(__i386__) || \ diff --git a/t1ha/t1ha0.c b/t1ha/t1ha0.c index 573ca7e7..f307d9a1 100644 --- a/t1ha/t1ha0.c +++ b/t1ha/t1ha0.c @@ -371,8 +371,20 @@ static __cold uint64_t x86_cpu_features(void) { __cpuid_count(7, 0, eax, extended, ecx, edx); } #elif defined(_MSC_VER) + #ifdef __clang__ + union + { + char text[16]; + uint32_t reg[4]; + } vender = { .text = { 0 } }; + uint32_t idmax = 0; + // id=0: idmax=eax, VenderID:ebx.edx.ecx + __cpuid (0, idmax, vender.reg[0], vender.reg[2], vender.reg[1]); + int *info = (int *) vender.reg; + #else int info[4]; __cpuid(info, 0); + #endif const unsigned cpuid_max = info[0]; if (cpuid_max >= 1) { __cpuidex(info, 1, 0);