[libcxx-commits] [libcxx] [libc++] Improve performance of std::midpoint for small types (PR #192804)

via libcxx-commits libcxx-commits at lists.llvm.org
Sun Apr 19 23:10:47 PDT 2026


serge-sans-paille wrote:

> Can we instead just get ourselves an extra bit via a `_BitInt` to do the arithmetic and truncate after again?

I've done so, but the result is slightly worse on 32 bit platforms: https://godbolt.org/z/653djMTP3

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


More information about the libcxx-commits mailing list