Cppcon 2021 From Problem to Coroutine: Reducing I/O Latency--Cheinan Marks

Registration is now open for CppCon 2021, which starts on October 24 and will be held both in person and online. To whet your appetite for this year’s conference, we’re posting some upcoming talks that you will be able to attend this year. Here’s another CppCon future talk we hope you will enjoy – and register today for CppCon 2021 to attend in person, online, or both!

From Problem to Coroutine: Reducing I/O Latency

Wednesday, October 27 • 10:30am - 11:30am

by Cheinan Marks

Summary of the talk:

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.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.