Precompiled headers (or other speed ups)

dewar@gnat.com dewar@gnat.com
Wed Jan 10 11:45:00 GMT 2001


<<I don't know enough about C++ or its implementation in GCC to say for
sure what the ultimate cause is.  I've been told that C++ has an
extremely ambiguous grammar and the parser has to accumulate entire
statements on the stack before it can begin to match anything.
There's an ad-hoc layer in between the lexer and the parser
(cp/spew.c) whose purpose is to rearrange the order in which certain
constructs appear so they are easier to parse; you can imagine the
mess that would require that.
>>

Sounds to me like the new Code Sourcery project to redo the parser has
the potential for good gains here. 


More information about the Gcc mailing list