True power set of a set is slower than power array of array

You can profile it to see what’s slow. Before looking at the code, I would guess that set union is slower than array concatenation because set union also requires checking for duplicates.

2 Likes