[cfe-dev] Hitting LexIdentifier with a minor performance hit

Sean Hunt rideau3 at gmail.com
Fri Dec 4 12:40:28 PST 2009


I'd like to split LexIdentifier into two functions so that the actual 
identifier lexing logic can be reused for user-defined literal suffixes. 
Since this is a change to the lexing code that will probably have a 
negative performance impact, however slight (one function call of 
overhead per identifier is added; one goto is removed per "nasty" 
identifier (a \, $, or ? is present)), I wanted to check it by first.

The effective change is that the literal lexing code will be able to use 
LexIdentifierInternal to parse the suffix when I add that in.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lexidentifier.patch
Type: text/x-diff
Size: 4451 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091204/bd0bc17d/attachment.patch>

More information about the cfe-dev mailing list