11.10.2016, 14:56
Quote:
hmm can you test its speed? im not home these days so i cant test myself.
Код:
new j=strlen(string); do { j--; //----- }while(j!=0); |
-----------------
Well, I'm not sure which one is the best option now.
for(new j = (strlen(cmd) - 1); j > -1; j --)
for(new j = (strlen(cmd) - 1); j != 0; j --)
Both seem to be the fastest in a production scenario.
-----------------
for(new j = strlen(string); j != 0; j --)
It becomes very slow in a production use, but seems to be the fastest in a plain loop.
-----------------
for(new j = 0, k = strlen(string); j != k; j ++)
Slice's fastest loop to his experience seems slower than the first loop in a production use, but faster in a plain loop.