C++Now 2018 has ended
Back To Schedule
Tuesday, May 8 • 2:30pm - 4:00pm
Futures Without Type Erasure

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

Feedback form is now closed.
The most popular implementations of futures, including `std::future`, use dynamic allocation and type erasure in order to allow composition of futures into fork/join asynchronous computation graphs. While this overhead is unavoidable when the control flow of the asynchronous graph depends on run-time conditions, it is unnecessary when the "shape" of the computation graph is known at compile-time.

* Is it possible to implement composable futures without dynamic allocation and type erasure?
* Is it worth it?

After a brief overview of the upcoming `std::experimental::future` additions focused on composability, this talk answers these questions showing the train of thought behind the design and implementation of an experimental future library, step-by-step. The library will revolve around the following idea: embed the asynchronous computation graph into types. Template metaprogramming and compile-time transformations will be heavily used to implement zero allocation & zero type erasure futures.
Running time, compilation time, and generated assembly benchmarks/comparisons will be provided and analyzed.

The code covered in the talk will make use of C++17 language and library features, that will be explained throughout the presentation. The intended audience for the talk should be familiar with most C++11/14 language features and with `std::future` (or `boost::future`). Knowledge of C++17 features is recommended but not required.

avatar for Vittorio Romeo

Vittorio Romeo

Software Engineer, Bloomberg
Vittorio Romeo (B.Sc. Computer Science) has been a Software Engineer at Bloomberg for more than 3 years, working on mission-critical company C++ infrastructure and providing Modern C++ training to hundreds of fellow employees.He began programming around the age of 8 and quickly became... Read More →

Tuesday May 8, 2018 2:30pm - 4:00pm MDT
Flug Auditorium