[libcxx-commits] [libcxx] [libc++] Implement single element vector::insert in terms of emplace (PR #210284)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 29 07:45:43 PDT 2026


================
@@ -1181,6 +1144,18 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args) {
     if (__p == __end) {
       __emplace_back_assume_capacity(std::forward<_Args>(__args)...);
----------------
ldionne wrote:

I think we should add benchmarks for `emplace` and `emplace_back` in the sequence container benchmarks.

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


More information about the libcxx-commits mailing list