Loading…
Tuesday, September 25 • 15:50 - 16:20
Why and How to Roll Your Own std::function Implementation

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

In recent years the increased usage of std::function has transformed the way many C++ programs are written. However, if your application is processing realtime data, or doing some other performance critical task, then the possibility of std::function allocating some memory from the heap may not be tolerable. It's also possible that the systems you are targeting simply lack a std::function implementation, preventing its adoption in applications for legacy operating systems, toolchains for embedded devices, and inside open source library code. Rolling your own implementation of std::function can provide a solution to both of these concerns simultaneously, allowing you to modernize your code and provide guarantees about the runtime performance of manipulating function objects.

This presentation outlines why and how a std::function replacement was added to the JUCE open source, cross platform, software development framework and discusses some differences between our implementation and others. We will also cover how we can move beyond the standard interface by extending the small buffer optimization to make manipulating callable objects more suitable for performance critical and realtime contexts, finishing with some examples of how this applies to processing live audio data.

Speakers
avatar for Tom Poole

Tom Poole

Lead Developer, JUCE
Tom Poole (PhD) is a senior software engineer at ROLI Ltd. and a maintainer of the JUCE open source, cross platform, C++ framework (https://juce.com). Before joining ROLI, he completed his PhD at Imperial College London, developing massively parallel Quantum Monte Carlo algorithms... Read More →


Tuesday September 25, 2018 15:50 - 16:20 PDT
Aspen Highlands Hall (1st Floor)