Minor improvement in set calculation speed