[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

Nikolas Klauser via cfe-commits cfe-commits at lists.llvm.org
Thu May 22 01:03:39 PDT 2025


philnik777 wrote:

> Thanks for working on that. Do you have any benchmarks?

I haven't benchmarked extensively, but as stated in the commit message, The instantiation of `std::format` is ~20ms faster. IMO that's a significant enough speedup on its own that it grants adding a builtin. 

I've just tested with `ranges::adjacent_find`, and there the instantiation goes down from  ~14.9ms to ~13.5ms. Not as impressive, but still quite nice. (And I've also noticed that `common_reference` takes an absurd amount of time to instantiate on `ranges::adjacent_find`)

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


More information about the cfe-commits mailing list