← Back to context

Comment by kreco

7 hours ago

The backslashes itself make the preprocessor way more complicated for no real advantage (apart when it's unavoidable like in macros).

For every single symbol you need to actually check if there is a splice (backslash + new line) in it. For single pass compiler, this contribute to a very slow lexing phase as this splice can appear anywhere in a C/C++ code.

I don't think this is optimizing for the right thing, I've sat in front of hundreds of gcc & clang compiler time traces and lexing is a minuscule percentage of the time spent in the compiler