[clang] [clang][Python] Use fstrings instead of string concatenations (PR #173861)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 29 22:20:01 PST 2025


mikomikotaishi wrote:

Fstrings provide a considerable performance increase over % and str.format(), to my knowledge (% must perform type checks, fstrings are optimised due to being core grammar features, and avoid additional function calls unlike % and str.format()).

I personally think being able to read the string with the interpolated variables at site is simpler than tracking them in order of arguments.

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


More information about the cfe-commits mailing list