rhelgeby / smprojectbase

Automatically exported from code.google.com/p/smprojectbase
0 stars 0 forks source link

Loop optimizing #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
accessmanager.inc:126 (in rev 24:5a8266a10f14)

for (new cindex = 0; cindex < strlen(strCvarRootFlags); cindex++)
{
    ...
}

I suggest you cache the strlen result in its own variable, and not in the 
loop. Right now the string length will be calculated each time you iterate 
a indes, but it will return the same result each time.

Check all your for-loops, because the compiler is dumb when it comes to 
optimizing on compile time.

Original issue reported on code.google.com by richard.helgeby@gmail.com on 8 Feb 2010 at 11:35

GoogleCodeExporter commented 9 years ago
Ah yes.  I forgot to do that.  I remember reading something BAILOPAN said about 
this a 
while back.

Original comment by andrewbo...@gmail.com on 8 Feb 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Done.

Original comment by andrewbo...@gmail.com on 8 Feb 2010 at 9:27