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

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Aug 7 00:20:21 PDT 2026


================
@@ -43,6 +43,25 @@ void bench(std::string name, Func func, Mod modifier = {}) {
 #endif
 }
 
+template <typename Iterator>
+struct unoptimizable_forward_iterator : Iterator {
+  using iterator_category = std::forward_iterator_tag;
+
+  unoptimizable_forward_iterator(Iterator i) : Iterator{i} {}
+
+  _LIBCPP_NOINLINE unoptimizable_forward_iterator& operator++() {
----------------
philnik777 wrote:

```suggestion
  TEST_NOINLINE unoptimizable_forward_iterator& operator++() {
```

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


More information about the libcxx-commits mailing list