From c4a9514d5e83c406ced92ac5a73a54b7627ddc0d Mon Sep 17 00:00:00 2001 From: Leonid Evdokimov Date: Wed, 25 Sep 2024 17:34:51 +0300 Subject: [PATCH] WIP-MAC-2 --- SuperFastHash.cpp | 8 +------- main.cpp | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/SuperFastHash.cpp b/SuperFastHash.cpp index 3e0d8766..4df34a60 100644 --- a/SuperFastHash.cpp +++ b/SuperFastHash.cpp @@ -21,17 +21,11 @@ FORCE_INLINE uint16_t get16bits ( const void * p ) { -#if 0 return *(const uint16_t*)p; -#else - const uint8_t *p8 = static_cast(p); - return p8[0] | (p8[1] << 8); -#endif } // objsize: 0-d2: 210 -uint32_t SuperFastHash (const char * data_, int len, uint32_t hash) { - const uint8_t *data(reinterpret_cast(data_)); +uint32_t SuperFastHash (const char * data, int len, uint32_t hash) { uint32_t tmp; int rem; diff --git a/main.cpp b/main.cpp index 9479ab4f..3fd7f4a9 100644 --- a/main.cpp +++ b/main.cpp @@ -323,12 +323,12 @@ HashInfo g_hashes[] = { jodyhash64_test, 64, 0xC1CBFA34, "jodyhash64", "jodyhash, 64-bit (v7.1)", POOR, {} }, #endif { lookup3_test, 32, 0x3D83917A, "lookup3", "Bob Jenkins' lookup3", POOR, {0x21524101} /* !! */}, -#ifdef __aarch64__ +#if CHAR_MIN >= 0 #define SFAST_VERIF 0x6306A6FE #else #define SFAST_VERIF 0x0C80403A #endif -{ SuperFastHash_test, 32, SFAST_VERIF,"superfast", "Paul Hsieh's SuperFastHash", POOR, {0x0} /* !! */}, +{ SuperFastHash_test, 32, SFAST_VERIF,"superfast", "Paul Hsieh's SuperFastHash, CHAR_MIN:" MACRO_ITOA(CHAR_MIN), POOR, {0x0} /* !! */}, { MurmurOAAT_test, 32, 0x5363BD98, "MurmurOAAT", "Murmur one-at-a-time", POOR, {0x0 /*, 0x5bd1e995*/} /* !! */ }, { Crap8_test, 32, 0x743E97A1, "Crap8", "Crap8", POOR, {/*0x83d2e73b, 0x97e1cc59*/} },