An early benchmark analysis of C++26 reflection's compile-time overhead using GCC 16. Key findings: the -freflection flag itself adds zero overhead, but including the <meta> header costs ~155ms per translation unit. Standard Library headers like <print> and <ranges> are the real bottleneck, not the reflection logic itself.

10m read timeFrom vittorioromeo.com
Post cover image
Table of contents
let’s measure!benchmark resultsinsightswhat about modules?conclusionshameless self-promotionappendix: previous benchmark results

Sort: