synopse / mORMot

Synopse mORMot 1 ORM/SOA/MVC framework - Please upgrade to mORMot 2 !
https://synopse.info
785 stars 323 forks source link

SynBloomFilter large volumes #450

Closed Uefi1 closed 6 months ago

Uefi1 commented 7 months ago

Hello, can I make a bloomfilter for any huge amount of data?

var
BloomFilter:TSynBloomFilter;

procedure Duplicates;
var
I:integer;
s:string;
begin 
for i:=0 to maxint do begin
s:=inttostr(Random(999999)+99999));
if not StrDictionary.MayExist(s) then
StrDictionary.Insert(s);
end;
end;

begin
Randomize;
BloomFilter:=TSynBloomFilter.Create(10000000);
Duplicates;
end;

It just seems to me that I'm doing something wrong: Bloomfilter does a very good job with small data, but outright lies with huge data

synopse commented 6 months ago

I can't understand your exact concern.

Please use the forum to discuss this.