CppCon 2018: Fabian Renn-Giles “A Semi Compile/Run-time Map with (Nearly) Zero Overhead Lookup”
Автор: CppCon
Загружено: 2018-10-23
Просмотров: 6463
Описание:
http://CppCon.org
—
Presentation Slides, PDFs, Source Code and other presenter materials are available at: https://github.com/CppCon/CppCon2018
—
An associative map container is one of the most useful data-structures in any modern program. Given a key, it can look-up the corresponding value incurring some runtime overhead. Often, however, this overhead is not strictly necessary as the key originated (either directly or indirectly) from a value which was known to the compiler at compile-time - such as a literal. In this talk, I will present a semi compile-/run-time map which can overcome this overhead by using C++’s constexpr features.
Yet another constexpr hash map talk, I hear you say? This one is different! Most constexpr maps presented at previous conferences are either constexpr-only, i.e. the values cannot be changed at runtime, or, require that all possible keys of the map are defined in one place making it unsuitable for library code. In contrast, the map presented in this talk, only calculates the storage of the key’s associated value at compile-time, but loading/storing the value and adding key/value pairs still occurs at run-time.
It will be shown how such a map can be used to implement a super efficient cache. In its most simplest form, looking up the storage of a primitive type for a given compile-time key has the same overhead as accessing a global variable. It will be shown that the underlying principle is surprisingly easy (3 lines of code) and the difficulty actually lies in associating any compile-time identifier to a unique C++ type - especially string literals. I will show how this can be achieved using constexpr if and constexpr lambda expressions - both C++17 features.
—
Fabian Renn-Giles, Fielding DSP
Senior Software Engineer
Fabian Renn-Giles (PhD) is a freelance C++ programmer, entrepreneur and consultant in the audio software industry. Up until recently he was staff engineer at ROLI Ltd. and the lead maintainer/developer of the JUCE C++ framework (www.juce.com) - an audio framework used by thousands of commercial audio software companies. Before joining ROLI, he completed his PhD at Imperial College London, developing a numerical quantum optics solver with modern digital signal processing techniques and C++/MPI/OpenCL. During his academic career, Fabian regularly taught C++ to post- and undergraduate students in tutor groups. In 2005, Fabian co-founded the audio plug-in start-up Fielding DSP which specialises in real-time audio plug-ins for audio mastering. Fabian now regularly consults on various audio related software projects. Additionally, he is a regular speaker and/or workshop leader at the C++ audio developer conference ADC. He also hosts the monthly audio developer meetup in London.
—
Videos Filmed & Edited by Bash Films: http://www.BashFilms.com
*-----*
Register Now For CppCon 2022: https://cppcon.org/registration/
*-----*
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: