> where the keys looks something like "if (a > b and c < d) or (a < b and d == b)"
Confused, what do you mean when you say the key is an "if" statement?
Confused, what do you mean when you say the key is an "if" statement?
This comes up frequently when looking for fuzzy "duplicates".
For example, sometimes you get data from 2 sources, one will send it through with 0.01 precision. Another will send it through with 0.001 precision. You can't hash or compare that.
Things get more tricky when different finance institutes used different terms for the same entity.
That doesn't mean you can't avoid n^2 duplicate searches. It just means you have to be smart about how you group things.