in reply to Re: Bidirectional lookup algorithm? (Updated: further info.)
in thread Bidirectional lookup algorithm? (Updated: further info.)

I was thinking pretty much along the same lines. The OP, however, seems to want it both compact and fast. Binary search will likely not satisfy the latter requirement. Couple links I googled up that might be of interest here:

  • Comment on Re^2: Bidirectional lookup algorithm? (Updated: further info.)