Added TODO about experimenting with Cuckoo Hashing.

pull/13171/head
Joshua Haberman 16 years ago
parent f4c00fc979
commit 5ec762a600
  1. 5
      upb_table.h

@ -64,6 +64,11 @@ inline struct upb_inttable_entry *upb_inttable_mainpos(
inline void *upb_inttable_lookup(struct upb_inttable *table,
int32_t key,
int32_t entry_size) {
/* TODO: experiment with Cuckoo Hashing, which can perform lookups without
* any branches, cf:
* http://www.cs.cmu.edu/~damon2006/pdf/zukowski06archconscioushashing.pdf.
* The tradeoff is having to calculate a second hash for every lookup, which
* will hurt the simple array case. */
struct upb_inttable_entry *e = upb_inttable_mainpos2(table, key, entry_size);
do {
if (key == e->key) return e;

Loading…
Cancel
Save