Reducing Memory Allocations in a Large C++ Application - Arnaud Desitter [ C++ on Sea 2020 ]

preview_player
Показать описание
Reducing memory allocations to improve performance has been a recurrent theme for a long time. Use of abstractions comes with increased use of heap allocations. This results in a widespread low level performance overhead. Sadly, memory profilers tend to scale poorly with the size of the application and number of allocations. Heaptrack, a low overhead Linux memory profiler written by Milian Wolff, makes routine analysis of memory allocations finally practical.

In this talk, I will demonstrate how heaptrack allows us to track all memory allocations with little overhead in a large C++ application. I will classify the memory patterns observed and detail the techniques used to address them. In practice, reducing the number of allocations by several order of magnitudes can be achieved. We will make full use of modern C++ up to C++17 with a glimpse of C++20.

-------

Arnaud Desitter is a senior software engineer based in Oxford with more than 20 years experience in scientific programming. He has worked on reservoir simulators for the last 14 years. He cycles to work, currently going through his third virtual trip round the world.

-------

C++ on Sea is an annual c++ and coding conference, usually held in Folkestone, Kent in the UK. The 2020 conference was moved to a virtual event due to social distancing requirements.

Рекомендации по теме
Комментарии
Автор

Thank you very much for your excellent presentation. I've recently begun working with Heaptrack, and your video has given me some new ideas. In the future, it would be great if you could improve the sound quality by wearing a microphone. Because you are not a native English speaker, it can be difficult at times to understand you. Thanks!

gillevk
Автор

very well done talk, learned a lot about optimizations. especially about that neat trick with having std::string_view in std::unordered_map with std::pair<std::string, val> instead of std::string! benchmarked after i applied some of your mentioned and explained optimizations and results are satisfying :)

VlingoVideo
Автор

The first 15 minutes are completely unnecessary. Skip them if you've ever profiled anything before.

ineqvation