[libcxx-commits] [libcxx] [libc++] Add benchmark for `std::exception_ptr` (PR #164278)
Adrian Vogelsgesang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 21 05:05:21 PDT 2025
vogelsgesang wrote:
> It doesn't benchmark individual functions like we usually do, so it's not at all clear what is actually improved/regressing.
I also added separate benchmarks for individual operations now. However, note that it's not possible to perfectly separate the benchmarks. E.g., `bm_exception_ptr_move_assign_nonnull` also implicitly benchmarks the (not yet inlined) copy constructor and destructor for `excptr_copy`.
Also, the combined `exception_ptr_move_copy_swap` function still adds additional value. E.g., for `bm_exception_ptr_copy_assign_null`, it's not that important whether the copy assignment is actually inlined or not. The benefits from inlining show mostly on follow-up operations, where the compiler can now proof that the copied-to variable is also a nullptr and (as soon as the destructor is also inlined) the compiler can also remove the destructor call completely.
https://github.com/llvm/llvm-project/pull/164278
More information about the libcxx-commits
mailing list