TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24942 17
Per-op allocs: can we get these all to zero?

The benchmark builds read streams at three abstraction levels on beman::execution and beman::execution::task to measure per-operation cost and allocations across execution models.

Per-operation allocation counts for I/O read_some, three stream abstraction levels:

awaitable (capy::task) native: 0 abstract: 0 type-erased: 0
sender (pipeline) native: 0 abstract: 1 type-erased: 1
sender (beman::task) native: 0 abstract: 1 type-erased: 1

The awaitable path preallocates at stream construction because coroutine_handle is already type-erased. The sender path heap-allocates per operation because connect produces a type-dependent operation state.

github.com/cppalliance/capy/tree/develop/bench/beman

Can someone help me get the sender rows to zero?

Here's a more detailed supporting analysis:

https://gist.github.com/sgerbino/2a64990fb221f6706197325c03e29a5e

https://redd.it/1sgvh2o
@r_cpp
GitHub capy/bench/beman at develop · cppalliance/capy Provides facilities for creating and accessing optional services during runtime. - cppalliance/capy
More from @r_cpp
  1. Oct 6, 2026Implementation of GCC's Nested Functions (vs. C++ Lambdas) https://uecker.codeberg.page/20…
  2. Oct 6, 2026C++26: Module improvements https://www.sandordargo.com/blog/2026/09/09/cpp26-modules https…
  3. Oct 6, 2026Tuning a Server for Benchmarking https://david.alvarezrosa.com/posts/tuning-a-server-for-b…
  4. Oct 6, 2026boost.org has been rebuilt: new profiles, badges, search, and library filtering The Boost…
  5. Oct 6, 2026When (Not) to Use alloca() https://voithos.io/articles/when-not-to-use-alloca/ https://red…
  6. Oct 6, 2026MSVC Build Tools Preview updates – September 2026 https://devblogs.microsoft.com/cppblog/m…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →