for (size_t counter = 0; counter < strlen(randomString); ++counter);
Oh, now this might take time that grows quadratically with the length of the string, depending on how smart the compiler is.
for (size_t counter = 0; counter < strlen(randomString); ++counter);
Oh, now this might take time that grows quadratically with the length of the string, depending on how smart the compiler is.
for (size_t counter = 0; counter < strlen(randomString); ++counter);
Oh, now this might take time that grows quadratically with the length of the string, depending on how smart the compiler is.
in release that should compile out, compilers are pretty good at seeing what is changing in a loop and what is not.
Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion
in release that should compile out, compilers are pretty good at seeing what is changing in a loop and what is not.for (size_t counter = 0; counter < strlen(randomString); ++counter);
Oh, now this might take time that grows quadratically with the length of the string, depending on how smart the compiler is.
for (size_t counter = 0; randomString[counter] != '\0'; ++counter);