htable: reduce size of htable by storing perfect bitnum, not mask.
[ccan] / ccan / htable / tools / speed.c
index dce3fdf911430ce66e8e6b16c2604723d9634f89..e185b6f69eb74f3435789d82abe144eb32d8d1ca 100644 (file)
@@ -74,8 +74,8 @@ static size_t perfect(const struct htable *ht)
                        continue;
                if (hash_bucket(ht, ht->rehash(get_raw_ptr(ht, ht->table[i]),
                                               ht->priv)) == i) {
                        continue;
                if (hash_bucket(ht, ht->rehash(get_raw_ptr(ht, ht->table[i]),
                                               ht->priv)) == i) {
-                       assert((ht->table[i] & ht->perfect_bit)
-                              == ht->perfect_bit);
+                       assert((ht->table[i] & ht_perfect_mask(ht))
+                              == ht_perfect_mask(ht));
                        placed_perfect++;
                }
        }
                        placed_perfect++;
                }
        }