ENH Speed up and simplify cartesian product

This can be removed now, right?