optimize some cycles: *) delete surplus variable; *) on i386/amd64 "while (n) / n--" is smaller than "while (n--)", because the platforms have no postfix operations