HackerTube.dev

CppCon 2018: G. Nishanov “Nano-coroutines to the Rescue! (Using Coroutines TS, of Course)”

CppCon · 40.3K views · 2018-10-08 · 1:04:26

Open on YouTube ↗

If playback is restricted in your region, try opening the original video. Use Mark watched to add it to your marked videos.

Overview

Gor Nishanov's CppCon 2018 talk on using tiny C++ coroutines to hide memory latency, interleaving useful work while prefetches bring cache lines in from main memory.

On Hacker News

Cited as a deep dive on coroutines for cache misses and on running huge numbers of coroutines without heap allocation.

Discussed on HN; no positive recommendation is recorded in this export · HN mentions 2018–2021

Topics

Search by tags

What people said

BenFrantzDale · 2021-02 · Reference

It's a big deal because, while it has some downsides, being stalkless means they can have next to no overhead, meaning it can be performant to use coroutines to write asynchronous code for even very fast operations. The example given [VIDEO] is that you can launch multiple coroutines to issue prefetch instructions and process the fetched data, so you can have clean code that issues multiple prefetches and process the results. Whereas in Python (don't get me wrong, I love Python) you might use a generator to "asynchronize" slow operations like requesting and processing data from remote servers, C++ coroutines can be fast enough to asynchronously process "slow" operations like requesting data from main memory.

Read the original HN comment ↗
je42 · 2019-08 · Reference

> In C++, technically every initialization of a sub-coroutine starts defaults to being a new heap allocation. I don't want to spread FUD: my understanding is that the vast majority of these are optimized out by the compiler. But one downside of this approach is that you could change your code and accidentally disable one of these optimizations. I don't think this is correct. C++ 20 allows a lot of choices to implement it without forcing a heap allocation. see [LINK] also see this video that goes in depth how to have billions of coroutines with C++: [VIDEO]

Read the original HN comment ↗
akubera · 2018-11 · Reference

Gor Nishanov, one of the authors, talks about this in his CppCon2018 talk [VIDEO] (jump to ~12:33 to skip background). It amounts to using CPU prefetch instructions with C++ coroutines to simulate hyperthreading in software by scheduling instructions around cache misses (but is potentially better than hyperthreads because it's not limited to 2/core)

Read the original HN comment ↗

Sources

Video by CppCon, played through YouTube.

Data and selection notes

HN summaries and labels may contain AI errors. HN dates refer to discussions, not video publication.

HN Library: HackerTube export (2026-10-31) and open-index/hacker-news. Upstream summaries and classifications may contain AI errors.

Views, duration and playback status refresh separately from the published catalog. When an update fails, existing data remains visible.

Selection checks
  • SaaS & AI candidates: Topic keywords do not match
  • Editor-approved picks: Editorial review is required

Rule matches identify candidates. They do not guarantee video quality or financial results.

About the library and its sources