Oops, I made a mistake:

> sizes). The hashkey calculation would be:
> 
> unsigned key= ladr & 0xFF;
> 
> the L1 table definition:
> 
> struct L1slot {
>   unsigned key1, val1;
>   unsigned key2, val2;
> } L1tab[0xFF];
> 
> the probe would be:
> 
> struct L1slot *p= &L1tab[key];
> if (p->key1 == key)
  if (p->key1 == ladr) /* much better */
>   return p->val1;
> else if (p->key2 == key)
  else if (p->key2 == ladr) /* likewise */
>   return p->val2;

Reply via email to