RedisBloom / RedisBloom

Probabilistic Datatypes Module for Redis
https://redis.io/docs/stack/bloom/
Other
1.63k stars 254 forks source link

Is there an `errorRate` argument for CuckooFilter (cfCreate)? #521

Closed scallionshen closed 2 years ago

scallionshen commented 2 years ago

I used integer range(1, 1e8) for cuckoo filter insert testing with cfAddNX command. After nearly 1000k elements was added , error count was about ~22k, i.e. errorRate was about 0.022, which is little bit high for me. I was wondering is there any errorRate argument for cfCreate

ashtul commented 2 years ago

No. We use a finger print with 255 different values. Having 2 alternative locations and bucketsize of two mean we test 4 elements per request. Therefore, the default error rate is 4/255 ~ 1.5%.

Why won't you use a Bloom filter?

scallionshen commented 2 years ago

bloom is fine for me, just having some trial with cuckoo filter . Thank you for the reply !