Loading…
CppCon 2021 has ended
Wednesday, October 27 • 10:30am - 11:30am
From Problem to Coroutine: Reducing I/O Latency

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
Coroutines are now officially part of the C++20 standard and one of their advertised uses is reducing I/O latency. Almost all of the literature on coroutines that I found illustrated either synchronous generators or described the nitty gritty details of coroutines using very simple usages. The best talk I found was Gor Nishanov's excellent talk from CppCon 2018, "Nanocoroutines to the Rescue!" (go watch it!) which solves a different problem than mine, but mostly illustrates the power of coroutines.

In this talk I want to approach coroutines from another direction. I will start with the problem, which almost all engineers face in some form, that of reducing I/O latency while searching and gathering data from a sequential file. Instead of going into the details of how the coroutines work, I will start with the naive synchronous solution and build up coroutines step by step to try and reduce latency, illustrating the pieces as they are added.

Finally I will compare this solution to an old-fashioned solution using threads and we'll see how the coroutines performance measures up and whether all the additional boilerplate needed is worth the additional trouble. I hope discussing the value of coroutines and future proposals for RAII and executors will spark a good discussion with the audience.

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Cheinan Marks

Cheinan Marks

Senior Developer
Cheinan Marks is a senior software developer, living in Berlin, where he starting a non-profit to research bioinformatics and bio-computation, specializing in genetics. He got his start in the TUTOR language on the PLATO system at the University of Illinois. Having gotten his doctorate... Read More →


Wednesday October 27, 2021 10:30am - 11:30am MDT