News for hackers. Stuff that matters.
Re:Increasing the D Compiler Speed by Over 75% by acqq on Friday July 26, 2013 @09:48AM (#6108156)
I did the small statistics of the lexer.c and considered it an example of the input. You have there some 3050 lines 90KB, inside of the file there are 44K space (chr(32)) characters, giving on average more than 10 spaces per line. To process the indentation spaces faster I'd try reading them in the loop after the nl something like:

    case '\n':
       char* t = p + 1; // skip the nl
       while ( *t == ' ' ) // skip the indent spaces
           t++;            // while avoiding the big switch
       p = t; 
       continue;
I don't know if it's worth, but seems a good compromise.

There are no comments on this comment yet.