toaststunt icon indicating copy to clipboard operation
toaststunt copied to clipboard

[Feature Request] Bloom Filter Set/List Intersection

Open biscuitWizard opened this issue 3 years ago • 4 comments

Intersecting two lists or sets would make an amazing built-in especially if it used a bloom filter algorithm, as it would be incredibly fast on what is sometimes a very close algorithm.

Unions, diffs, and intersections would all make great builtins, being common operations.

biscuitWizard avatar Oct 03 '21 13:10 biscuitWizard

The STL contains algorithms for this (set_difference, set_intersection, set_symmetric_difference, and set_union). I don't know what algorithm implementations use, though.

ethindp avatar Nov 15 '21 23:11 ethindp

I have once created C built-in implementations of the LambdaMOO $set_utils that I can share if desirable.. Wouldn't know about the used algorithm though...

Update: I read about the bloom filter and that's definitely not what I used back in 2008.. They're still faster than MOO-verbs though.

tvdijen avatar Nov 16 '21 07:11 tvdijen

There's always the brute force approach! https://devblogs.microsoft.com/cppblog/using-c17-parallel-algorithms-for-better-performance/

Yeah, anything faster than moo-verbs would be fantastic.

biscuitWizard avatar Nov 17 '21 13:11 biscuitWizard

set_utils.cc.txt

tvdijen avatar Nov 17 '21 14:11 tvdijen