ctbench - compile-time benchmarking and analysis
Résumé
With libraries like Eigen (Guennebaud et al., 2010), Blaze (Iglberger, 2012), and CTRE (Dusíková, 2018) being developed with a large tempalte metaprogrammed implementation, we’re seeing increasing computing needs at compile time. These needs might grow even larger as C++ embeds more features over time to support and extend these kinds of practices, like compile-time containers (Dimov et al., 2019) and static reflection (Vandevoorde et al., 2022). However, there is still no clear cut methodology to compare the performance impact of different metaprogramming strategies. And as new C++ features allows for new techniques with claimed better compile-time performance, no proper methodologies are provided to back up those claims. This paper introduces ctbench, a set of tools for compile-time benchmarking and analysis in C++. It aims to provide developer-friendly tools to declare and run benchmarks, then aggregate, filter out, and plot the data to analyze it. As such, ctbench is meant to become the first layer of a proper scientific methodology for analyzing compile-time program behavior. We’ll first have a look at current tools for compile-time profiling and benchmarking and establish the limits of current tooling, then we’ll explain what ctbench brings to overcome these limits.
| Origine | Fichiers éditeurs autorisés sur une archive ouverte |
|---|---|
| Licence |