Hacker News new | ask | show | jobs
by dzaima 333 days ago
Wouldn't it be just a trivial O(n) of a loop of "for (x in dense vector of one set) { if (is x a member of the other set) add to result; }"?
1 comments

True. The constant factor is nasty, though, compared to the 256-bits-per-instruction of normal bit sets.
Right; generally the constant factors of this approach are horrible though, can't think of any situation where it'd be worth it on systems with, well, cache (or a TLB for that matter, which is even worse off with the sparse memory usage).