[libcxx-commits] [libcxx] [libc++] Optimize basic_string::append(Iter, Iter) (PR #169794)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Dec 2 09:18:03 PST 2025


================
@@ -122,6 +125,26 @@ static void BM_StringResizeAndOverwrite(benchmark::State& state) {
 }
 BENCHMARK(BM_StringResizeAndOverwrite);
 
+template <class Container>
+static void BM_StringAppend(benchmark::State& state) {
+  std::string orig_str = "This is some data so the string isn't empty";
----------------
ldionne wrote:

```suggestion
  std::string const orig_str = "This is some data so the string isn't empty";
```

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


More information about the libcxx-commits mailing list