hash-sets: faster intersects?.
parent
28b194d5fc
commit
200e37671f
|
@ -138,6 +138,12 @@ INSTANCE: hash-set set
|
||||||
|
|
||||||
M: hash-set intersect (intersect) >hash-set ;
|
M: hash-set intersect (intersect) >hash-set ;
|
||||||
|
|
||||||
|
M: hash-set intersects?
|
||||||
|
over hash-set? [
|
||||||
|
small/large [ array>> ] dip [ in? ] curry
|
||||||
|
[ if ] curry [ dup tombstone? [ drop t ] ] prepose any?
|
||||||
|
] [ small/large sequence/tester any? ] if ;
|
||||||
|
|
||||||
M: hash-set union
|
M: hash-set union
|
||||||
over hash-set? [
|
over hash-set? [
|
||||||
small/large [ array>> ] [ clone ] bi*
|
small/large [ array>> ] [ clone ] bi*
|
||||||
|
|
Loading…
Reference in New Issue