filmov
tv
CppCon 2018: Tom Poole “Why and How to Roll Your Own std::function Implementation”
Показать описание
—
—
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.
—
Tom Poole, ROLI
Senior Software Developer
—
*-----*
*-----*
—
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.
—
Tom Poole, ROLI
Senior Software Developer
—
*-----*
*-----*
Комментарии