On 22 September 2013 20:27, Walter Bright <[email protected]> wrote: > 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 (!).
Depends on what you mean by "recently". GCC has certainly gained a fair few compilation/optimisation passes over the past few releases. 4.3 - 223 passes (2008) 4.4 - 225 passes (2009) 4.5 - 239 passes (2010) 4.6 - 241 passes (2011) 4.7 - 252 passes (2012) 4.8 - 268 passes (2013) 4.9 - 269 passes (development) And showing column numbers has been turned on since gcc-4.4 (released in 2009). Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
