Optimized powerset