lisdude / toaststunt

A network accessible, multi-user, programmable, interactive system for the creation of LambdaMOO style MOOs / MUDs.
63 stars 27 forks source link

[Feature Request] Bloom Filter Set/List Intersection #49

Open biscuitWizard opened 3 years ago

biscuitWizard commented 3 years ago

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.

ethindp commented 2 years ago

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.

tvdijen commented 2 years ago

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.

biscuitWizard commented 2 years ago

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.

tvdijen commented 2 years ago

set_utils.cc.txt