[libcxx-commits] [libcxx] [libc++] Simplify bitset::{any, all} (PR #128445)

Peng Liu via libcxx-commits libcxx-commits at lists.llvm.org
Wed May 14 08:18:59 PDT 2025


winner245 wrote:

In terms of codegen (https://godbolt.org/z/cdEbbTTnY at -O2), I found that the previous implementation generates more efficient assembly as it directly checks the underlying storage. In contrast, my proposed implementation introduces function calls to `std::__find` and `__bit_iterator`, resulting in additional stack operations. This indicates that the original implementation has advantages in terms of performance. I will explore ways to refactor it while maintaining efficiency.


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


More information about the libcxx-commits mailing list