[clang] [Clang] [Lexer] Optimize CharInfo.h utilities (PR #171052)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 8 06:43:24 PST 2025


AaronBallman wrote:

> This change _does_ increase instruction count, but seems to be faster nonetheless: [llvm-compile-time-tracker](https://llvm-compile-time-tracker.com/compare.php?from=93e18db3e48dc28818d4880e813b9027bfbf3c16&to=cf26169083f2a68766df65607bec1547d3079aad&stat=task-clock) (that's a different commit, but basically the same changes).

I'd like to understand this a bit more because as best I can tell, this looks to regress performance.  CC @nikic for more opinions on the perf side of things.

As far as the changes go, I prefer the original code because it was more clear what was going on. So unless this measurably improves performance, I'm not certain it's a direction we should head (though @cor3ntin is the code owner there, so maybe he feels differently).

https://github.com/llvm/llvm-project/pull/171052


More information about the cfe-commits mailing list