11.10.2016, 18:18
How do you do your benchmarks?
I tried out the third slowest one:
And this one (which is supposedly faster):
(All according to your list)
It turned out that the while loop is actually faster.
(I tested it out on a 34 characters long string)
Either I'm doing something wrong, or you are.
Can you please post the code?
I tried out the third slowest one:
Код:
new j = -1; while(string[++ j])
Код:
for (new j = strlen(str)-1; j > -1; j--)
It turned out that the while loop is actually faster.
(I tested it out on a 34 characters long string)
Either I'm doing something wrong, or you are.
Can you please post the code?