Another thanks for inspiration to RWH - Bloom Filters

Hi all, My app has to use rather large amounts of static data in order to run. I have been using an SQLite database to hold this data so far. The largest chunk of data was a table with roughly 80k records. I only make use of this table to see if a particular key is present. Reading RWH over from time to time I came accross the Bloom Filter and finally realized that this would be a much better solution. So I could insert all the keys in the table into a suitable bloom filter instead and the just query the bloom filter instead of the database. I haven't figured out yet how to write a "literal" representation of the "filled" bloom filter yet though and could do with some tipps. I'm using the bloomfilter package from hackage. Günther

Günther Schmidt
So I could insert all the keys in the table into a suitable bloom filter instead and the just query the bloom filter instead of the database.
Somewhat dependent on your need (i.e. Bloom filters may give false positives), this could be what you need. Bloom filters work well as a cache, especially when you expect lots of negative lookups and will do some more work on the positive ones (including identifying false positives)
I haven't figured out yet how to write a "literal" representation of the "filled" bloom filter yet though and could do with some tipps.
I'm not sure I understand what you mean here. -k -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
Günther Schmidt
-
Ketil Malde