Please don't use this hash, or at least invert it with reverse!
I agree with Grandfather, use a data structure prepared for optimizing many lookups, like a sorted array. If the logarithmic O of a simple binary search is still to expensive you can still try niftier things like weighted searches, nested lookup tables for intervals or trees.
Cheers Rolf
In reply to Re: Lookup closest hash key
by LanX
in thread Lookup closest hash key
by Just in
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |