Hacker News new | ask | show | jobs
by bawolff 2 hours ago
Mistakes are always easy to recognize in retrospect, so hopefully this comment isnt too unfair, but one thing that caught me about this, is that logically it makes no sense. You would never use a bloom filter for just 10 entries. If you have only 10 entries it is almost certainly faster to skip the bloom filter. So i feel like that is the part that should have instantly stood out.

[Obviously, i've made my own silly mistakes over the years, many much sillier than this, its just weird to describe this one as only detectable by profiling]

1 comments

Sure, it logically makes no sense. But while learning a new subject, have you never made a silly mistake like:

bool getSchemaSizes(size_t * expectedBatchSize, size_t * expectedEntriesPerBlock) { ... }

size_t expectedEntriesPerBlock, expectedBatchSize;

getSchemaSizes(&expectedEntriesPerBlock, &expectedBatchSize)

initBloomFilter(expectedEntriesPerBlock)

I said as much in my comment.