Automatically Process Your Operations in Bulk With Coroutines
summary
Claim: let per-item code stay simple while C++20 coroutines transparently gather arguments and dispatch bulk calls. Implementation builds a minimal task/awaitable, an executor and a batcher + executor + task cooperating to suspend, collect vectors, run the bulk function and resume callers. A full-from-scratch prototype runs and benchmarks: manual batching is ~50× faster than no-batch; coroutine batching matches or slightly beats manual when vectors are reserved; naive coroutine overhead is ~200 ns/item but optimized variants close the gap.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:31Explanation
- 15:42Curtain Handle
- 19:57Implementing the Idea
- 25:39Task struct
- 32:21Executor
- 33:32Execution
- 35:05Instantiate Executor
- 36:25Batcher
- 40:12Batcher Implementation
- 49:43Asynchronous Transfer Protein
- 52:43Visual Representation
- 56:03Open Question
related talks
59mC++ Coroutines, from Scratch
53mBuilding Your Perfect World With Concurrent Combinators in F#!
34mParallel computing in React
29mParallel computing in ReactJS: Provide a pleasant user experience
44mMigrating a Library from RxJava To Coroutines
30mCracking the Concurrent Mode
54mKeynote: What Comes Next
35mEffect ful computations with Fibers
