* below. These should be autovectorized by gcc.
*/
#ifdef __x86_64__
-static GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
+GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
const uint64_t mix = 0xC6A4A7935BD1E995UL;
const int rot = 47;
size_t size = strlen(key);
}
#else
-static GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
+GMQCC_INLINE uint32_t util_hthashfunc(hash_table_t *ht, const char *key, size_t seed) {
const uint32_t mix = 0x5BD1E995;
const uint32_t rot = 24;
size_t size = strlen(key);
/* we use the crc table as seeds for the murmur hash :P */
size_t util_hthash(hash_table_t *ht, const char *key) {
static size_t seed = 0;
- register size_t hash = util_hthashfunc(ht, key, util_crc32_table[seed]);
+ register size_t hash = util_hthashfunc(ht, key, util_crc32_table[seed++]);
/* reset seed */
if (seed >= sizeof(util_crc32_table) / sizeof(*util_crc32_table))