Made the _calculate_sqs_repetitions function a bit faster.