pcollections
pcollections copied to clipboard
optimize `PSet.intersect()`
- [ ] if the passed list is a
Set, then iterate over whichever set is smaller, so we getO(mlgn)complexity, with m<n - [ ] benchmark that this is actually faster
(Also, is there a heuristic for plus-ing the intersection up from empty if it's small, versus minus-ing it down from full (as the current code does) if it's big? Probably nothing consistent…)