[clang] [Clang][Lexer][Performance] Optimize Lexer whitespace skipping logic (PR #180819)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 16 02:55:27 PST 2026


cor3ntin wrote:

I think we are splitting hairs here.

It does make sense to optimize for SPACE as it is the most frequent space separators. tabs are not unusual but much less frequent on average. Anything else is not worth even considering. if you use vertical tabulations, you deserve a 2% performance penalty. I liked that the original approach was simple enough that it was justify for a small performance improvement, even if that it is certainly architecture dependent. I don't think it would ever be worse than status quo.

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


More information about the cfe-commits mailing list