optimized set operations