High-Performance Metaprogramming - Template Metaprogramming in C++ - E10

58 Просмотры
Издатель
Compilation time is often a problem for big C++ projects. If you've been playing around with the template-heavy metaprogramming techniques we've discussed in this series, you might have already noticed that they can be a big contributor to compilation time. Especially in large projects.
In this episode we are starting the section on high-performance metaprogramming. The art of making our metafunctions compile faster! We'll first dicuss a more reliable way of measuring compilation time. We then take a deep dive into the different operations the compiler performs while processing our metafunction and look at how much time each of those operations costs. Based on those findings we start rewriting our first metafunction to compile faster and also demonstrate this in practice.

Github: https://github.com/QBouts/BitsOfQ

Full playlist: https://youtube.com/playlist?list=PLWxziGKTUvQFIsbbFcTZz7jOT4TMGnZBh


Related content

Dependent names: https://youtu.be/_yqIdYBdyPo?t=817s

Odin's blog on the Kvasir::mpl high performance metaprogramming library:
http://odinthenerd.blogspot.com/2017/03/start-simple-with-conditional-why.html

-- TIMESTAMPS --
00:00 - Intro
01:03 - The problem with measuring compile time
02:20 - More accurate measurements
03:27 - Cost of operations
06:56 - The goal
07:26 - Analysing our current if_ implementation
08:59 - A faster if_
11:06 - Putting it into practice: Benchmarking
14:15 - What's next?

If you have any questions or feedback, just leave a comment below.

See you next time!
Категория
Язык программирования C++
Комментариев нет.