ARTparse question

Forrest J. Cavalier III mibsoft at epix.net
Tue Nov 18 19:17:14 UTC 2003


Is it my misunderstanding that the ARTparse code
for parsing headers has a for() loop which does
an unnecessary inefficient search.

The code reads:

    for (; i < limit ;) {
      if (data->LastCRLF + 1 == i) {
         ... code block here ...
      }
      i++;
    }

If there are no label statements inside the
code block and no assignments to i, couldn't that
run much more efficiently as:

   if (data->LastCRLF + 1 < limit) {
      i = data->LastCRLF + 1;
      ... code block here ...
   } else {
      i = limit;
   }

Why the incremental search of i?

How far back was this last changed?  What is the
commit message?




More information about the inn-workers mailing list