On 9/22/2013 11:43 AM, Timon Gehr wrote:
Tracking line numbers is likely worth it. I don't believe that providing column
numbers in error messages necessitates a slowdown though.

Please consider that:

     IT ISN'T JUST FOR ERROR MESSAGES

It would go in the symbolic debug info, too, where it will be required everywhere and will be right there on the fast path through the lexer/compiler.

Now consider the lexer doing a fast skip over comment text (this ranks fairly high in the profile). This operation gets a lot slower if you're also keeping track of column number. Please note that:

     COLUMN NUMBER ISN'T THE OFFSET FROM THE START OF THE LINE

because of tabs and UTF-8 sequences.

Any proposal for column number tracking must take these issues into account.

Also note that g++ and clang are hardly noted for their fast compile speeds. Also note that g++'s compile speed has dropped significantly lately - I don't know why, but it also added column number support recently (!).

Reply via email to