2 ms·
With a tiny bit of extra cost, a very expensive check can sometimes be omitted early. Imagine your mailbox out in your yard has a slightly faulty indicator: So
by hypertele-Xii 5y ago
With a tiny bit of extra cost, a very expensive check can sometimes be omitted early.
Imagine your mailbox out in your yard has a slightly faulty indicator: Sometimes when it's ON, there's actually no mail. But you know for a fact that when it's OFF, you definitely have no mail. So you can look out your window to determine whether you might have mail.
If the indicator saves you more unnecessary trips to the mailbox than it causes by failing to indicate, it's a good thing to have overall.
That's what bloom filters do. They sometimes save you needless work. The fact that "sometimes" isn't deterministic doesn't detract from its usefulness.