in reply to Re^2: Search a hash for closest match
in thread Search a hash for closest match

Given small number of searches and the ~40k values per search, you may well find that a simple linear search using List::MoreUtils::firstidx() is more than adequate for your needs.

Indeed, you may well find that as the linear search is coded in C, that it beats a binary search in Perl.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.