--------------------- PatchSet 8574 Date: 2006/08/31 05:33:12 Author: adri Branch: parserwork Tag: (none) Log: This change (mime[e]; -> *mime; mime++;) seems to speed things up. I have a feeling the compiled assembler is more efficient as GCC isn't optimising the array access but I haven't checked into it too much yet. Tis weird! Members: src/mime.c:1.17.16.2->1.17.16.3 Index: squid/src/mime.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/mime.c,v retrieving revision 1.17.16.2 retrieving revision 1.17.16.3 diff -u -r1.17.16.2 -r1.17.16.3 --- squid/src/mime.c 27 Aug 2006 02:16:37 -0000 1.17.16.2 +++ squid/src/mime.c 31 Aug 2006 05:33:12 -0000 1.17.16.3 @@ -1,6 +1,6 @@ /* - * $Id: mime.c,v 1.17.16.2 2006/08/27 02:16:37 adri Exp $ + * $Id: mime.c,v 1.17.16.3 2006/08/31 05:33:12 adri Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived @@ -124,19 +124,19 @@ while (e < l && state < 3) { switch (state) { case 0: - if ('\n' == mime[e]) + if ('\n' == *mime) state = 1; break; case 1: - if ('\r' == mime[e]) + if ('\r' == *mime) state = 2; - else if ('\n' == mime[e]) + else if ('\n' == *mime) state = 3; else state = 0; break; case 2: - if ('\n' == mime[e]) + if ('\n' == *mime) state = 3; else state = 0; @@ -144,7 +144,7 @@ default: break; } - e++; + e++; mime++; } if (3 == state) return e;