Code: Select all
/* lookup pos. in hash table*/
j=(k*E^J)&U-9; /* try 8 consec. locations */
W((h=A[++j].K)&&h-Z&&--i); /* first empty or match */
a+=i?j:0; /* dummy A[0] if miss & full*/
For a small saturated table, would you still prefer the paired shallowest-of-two with undercut aging, or does a short linear probe (say 8 slots) with shallowest-of-N replacement buy anything over the pair? On Chombit I'm counting instructions per node rather than cache misses, so the probe width tradeoff is different from a PC.
(The full Hybrix language source code will take me a few weeks to finish. I'll post it here for review when it's ready.)
