static sw_inline swTableRow* swTable_hash(swTable *table, char *key, int keylen) { uint64_t hashv = swoole_hash_austin(key, keylen); uint32_t index = hashv & (table->size - 1); assert(index < table->size); return table->rows[index]; }
static sw_inline swTableRow* swTable_hash(swTable *table, char *key, int keylen) { #ifdef SW_TABLE_USE_PHP_HASH uint64_t hashv = swoole_hash_php(key, keylen); #else uint64_t hashv = swoole_hash_austin(key, keylen); #endif uint32_t index = hashv & table->mask; assert(index < table->size); return table->rows[index]; }