[libcxx-commits] [libcxx] [libc++] added benchmarks for `string::append()` (PR #213990)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 24 03:54:26 PDT 2026


================
@@ -43,6 +43,25 @@ void bench(std::string name, Func func, Mod modifier = {}) {
 #endif
 }
 
+template <typename Iterator>
----------------
philnik777 wrote:

> > We probably want something like this in lots of places a container takes iterators.
> 
> I don't know what you mean by "something like this", please be specific.

Something similar to what is added in this patch.

> I don't know which "places a container takes iterators" you have in mind, please list these places and describe what exactly should happen there.

Any containers fulfilling [sequence.requirements] or [unord.req] and any overloads in there taking `i, j`.

I don't want anything to happen with them in this patch, but they should probably get similar coverage at some point, so having this as a general utility is much better than burying it somewhere in a `.bench.cpp`.

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


More information about the libcxx-commits mailing list