Unrolling technique ( assuming that n is a multiple of 8 ) .
sum = 0 NEW_LINE for i in range ( 1 , n + 1 , 8 ) : NEW_LINE INDENT sum += i NEW_LINE sum += ( i + 1 ) NEW_LINE sum += ( i + 2 ) NEW_LINE sum += ( i + 3 ) NEW_LINE sum += ( i + 4 ) NEW_LINE sum += ( i + 5 ) NEW_LINE sum += ( i + 6 ) NEW_LINE sum += ( i + 7 ) NEW_LINE DEDENT