Try to reduce the calls of calculateSymmetryNumber.