this is a sort of thing that happens surprisingly often, thanks to null-terminated strings and the need to malloc space for the NUL terminator. and I guess starting the integer at 0xFFFFFFFF and then subtracting one for each loop and then doing a bitwise not is cheaper?