Files
carbon-lang/toolchain
Chandler Carruth 6f5934a505 Unblock more lexer inlining. (#3274)
The big change is to make the lexer helpers have internal linkage,
making all of them easy to inline into single call sites.

Looking at the profile showed several other cases of unfortunate
out-of-line functions. Two were due to the code size produced for checks
-- those are switched to `DCHECK`s to remove that code from optimized
builds. The loss of coverage seems minor.

A last one was closing open groups. This was a surprising routine to be
hot, but it the paths to discover "nothing to do here" were intertwined
into the code. This PR extracts this common trace into a separate
function that delegates to the looping recovery path. This lets the hot
path inline easily.

At this point, for a large lexing benchmark I'm using, 50% of the time
is in the identifier hash table at this point. The remaining
improvements are to actually make some of the hot routines like symbol
lexing and comment lexing faster.
2023-10-10 21:30:07 +00:00
..
2023-09-15 21:28:15 +00:00
2023-10-10 21:30:07 +00:00

Toolchain

A design is currently maintained in Google Drive. It'll be migrated to markdown once we are confident in its stability.