~/talk

From Problem to Coroutine: Reducing I/O Latency

Talkat CppCon 2021 · on Wednesday, 2021-10-27· at 10:30· online· [frontend-architecture]
links:none on file
slides:none on file

Uses C++20 coroutines to build a fastq generator that yields each read, moves compute into the coroutine body and resumes on a thread-pool via a promise/awaiter boilerplate; compares that to an old-fashioned producer/consumer thread approach. Result: coroutine version matches the single‑threaded run (≈3.5s for 5M reads) while a threaded consumer cuts it to 1s vs 3.5s. Practical pitfalls include heavy boilerplate, painful debugging and even 5000 spurious coroutines per read when IO is naively offloaded.

AI-written summary · about

  1. 0:00Start
  2. 1:47Experience with Core Routines
  3. 2:22Introduction to Core Routines
  4. 13:54Not Using Core Routines
  5. 16:21Unified Executor Library
  6. 21:53Offline Offloading the Compute to a Worker
  7. 24:20Asymmetric Transfer
  8. 26:35How Does a Function Work
  9. 28:45Debugging the Core Routines
  10. 29:45How Does Resume and Compute Pull Work
  11. 31:17Is Core Routine Handle Passed by Value
  12. 38:16Created the Promise Type
  13. 40:50Example Code
  14. 41:22The Work Goes in the Core Routine Body
  15. 1:00:22If Core Routines Is Not Faster Why Use It
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.