Julien Jorge's Personal Website

Meeting C++ 2023 Trip Report

Thu Nov 23, 2023

I’ve been attending the Meeting C++ 2023 conference which took place at the Vienna House hotel in Berlin from November 12 to November 14. The days were packed with awesome talks. The venue was great and the team did a good job at organizing everything, unfortunately they could not receive our badges on the first day, and even though they printed them themselves for the second day, there were not enough badge holders. So we ended up with no badge. Nobody knew it was me all along! (Insert evil laugh).

If I understood correctly all the talks are going to end up on YouTube at some point, so stay tuned.

One last thing before going into the contents. If you ever go near the hotel, give a try to Budike; it’s a great place to eat ;)

Day 1

Opening Keynote - Six impossible things, by Kevlin Henney.

This talk perfectly did its job as an opening for the conference. Nothing complex here, it was a quite entertaining and inspirational view on software.

Memory Model: Get your shared data under control, by Jana Machutová.

In this talk the speaker presents the many synchronization primitives available since C++20, std::latch, std::barrier, std::counting_semaphore and std::binary_semaphore, std::mutex, and std::condition_variable; the last two being available since C++11. I think it was the first time for the speaker, who did quite well. I learned something and dug a bit deeper on the topic since. So all good.

Expressive Compile Time Parsers, by Alon Wolf.

Awesome talk where the speaker presents many libraries to build a compile-time parser, i.e. a parser that would process a string during the compilation. Such libraries include Boost.Metaparse, CTRE, CTPG, Macro Rules, and YACP. The speaker then manages to build some reflection tools with them with zero run-time overhead.

Data Storage in Entity Component Systems, by Mathieu Ropert.

This one was a nice introduction to ECS and data-oriented design even though it left me hungry for more. The speaker presents good and bad sides of ECS. For the good sides we can list a decoupling of the code, the performance-friendly data layout, the natural parallelization of systems that work on different components. On the bad sides, mostly a more complex interface which forces developers (game designers in his case) to know which components are available when. From the speaker own admission, he had no figure to tell if the approach was viable or not. Unfortunately for me this was the kind of information I was looking for :)

Here is a bunch of additional talks related to ECS and data-oriented design you may want to watch. I strongly recommend the first two: The first one goes into the details of the systems from an actual very successful game, the second one is a classic that breaks with the academic approach of programming.

Playing Video Games One Frame at a Time, by Ólafur Waage.

Awesome talk where the speaker presents three techniques to make the computer to play a video game without the help of a user. The first one uses Doom, the game from 1993, as its material. Doom has support for demo files the game can play automatically. By patching the game to skip the rendering, it becomes a command-line tool that can be used to validate forks of Doom that intend to stay true to the original. By passing the same demo file to both the fork and the original, the final state must be the same.

The second game is Bejeweled, for which the speaker does not have the code. Anyway, with the help of OpenCV and the Windows API he manages to write a program that captures the game’s screen, deduce its state, pick an action, and simulate mouse inputs to apply it.

Finally, the last game is VVVVVV. Even though the code is available, the speaker did not patch it. Instead he runs it as a subprocess and hooks his own functions, effectively replacing the DirectX API unknowingly from the game, then he uses these functions to deduce the game state and to inject his actions.

Day 2

Center Keynote - Helping Open Communities to Thrive, by Lydia Pintscher.

The speaker presents her journey as an active contributor of two open source projects: VLC and KDE. The discussion is wide and we can appreciate the interesting take on management, as in open source you cannot force people to do something, you can only invite them to converge toward a common goal. Having a written mission for the KDE project, as a whole, did greatly help into pushing people to work collectively. Also, she makes a parallel between KDE and C++ by claiming that both do not thrive for the latest tech hype.

Using the Filter View in Practice, by Nicolai Josuttis.

In this talk the speaker presents some aspects of C++20’s ranges library, namely std::ranges::filter_view and its combination with std::ranges::take, std::ranges::drop, and the std::vector and std::list containers. It happens that many combinations of these tools, and also by introducing constness, lead to either cryptic and unexpected error messages, bad performance, or undefined behavior.

Teaching modern C++: Is it a job or a mission? By Boguslaw Cyganek

This was a great talk. The author teaches C++ professionally in the university of science and technology of Krakow, Poland. His students are C++ beginners. Through this talk he unrolls a good share of the complexity of C++, discussing about what should be teached and when. His approach presents the language very progressively, without omitting the hardware aspect, i.e. that the program is intended to be executed on actual hardware, and teaching other aspects of software along the way (testing, design patterns…).

Class Layout, by Miloš Anđelković

The author goes into the topic of class’ data layout in memory and the effect of padding. There is a discussion about the empty base optimization and [[no_unique_address]], the latter showing different results depending on the compiler. He also presents some developer flags implemented in GCC and Clang to dump the layout of a class. For the former it would be -fdump-lang-class, for the latter -cc1 dump-record-layouts or -Xclang dump-record-layouts. These flags existing for compiler developers, they may change from one version to the other, so don’t rely on them.

Follows some benchmarks comparing the performance with two different layouts of the same class. Unfortunately these benchmarks use std::sort with a non-strict ordering operator, thus the results are at best dubious, even though the operator is broken in the same way for both classes.

Optimizing Multithreaded Performance: Unveiling False Sharing and Harnessing Hardware Destructive Interference, by Shivam Kunwar

The author presents the concept of false sharing, how it can impact performance negatively, and how to avoid it. This is a nice introduction to the topic.

Day 3

What is a random number and why should I care? By Frances Buontempo.

A discussion about what is a random number in general and in computer science, how to get a randomly generated number, and when does the randomness actually matter. Interesting but I have not so much to say about it.

Advanced SIMD Algorithms in Pictures, by Denis Yaroshevskiy.

A presentation of SIMD implementations of std::memcmp, std::copy_if, std::set_intersection, and std::sort. Quite interesting but a bit difficult to follow. The speaker is an author of EVE, which provides SIMD implementation for some algorithms as well as tools to build portable SIMD implementations.

Taming lambdas’ uniqueness, by Dawid Zalewski

Another excellent talk. It is well known that each lambda has its own type, which usually means that different lambdas cannot be stored in the same container without type erasure, which happens with a performance cost. By extending the “overloaded” idiom and through clever use of C++ type deduction and other metaprogramming techniques, the speaker manages to implement a static container for multiple lambdas with no run-time overhead (depending on the compiler). Interestingly, the build duration seems barely impacted.