-
The repo with source code is here https://github.com/serpent7776/cpp-ranges-bench
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
Catch
A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
The code uses catch2 to test for correctness and performance. Catch2 is a unit testing framework for C++, but it also provides basic micro-benchmarking features. Unfortunately, it doesn't provide any way to visualise the results, so I created a script and submitted PR adding plotting capabilities to Catch.
-
rangesv3 - Uses ranges-v3 - range library for C++14/17/20. Pretty close to the implementation using std::ranges, but a bit more complex, because it distinguishes between actions and views. This method uses the reverse action with views and to_vector, which might allocate an extra vector.
-
fluxranges - Uses flux, a C++20 library for sequence-oriented programming. Quite noisy compared to other range implementations.
-
I will then convert the stats file with a perf-stat-to-sc script I wrote. It will create a sc-im spreadsheet, which will make it easier to compare the results.
-
I will then convert the stats file with a perf-stat-to-sc script I wrote. It will create a sc-im spreadsheet, which will make it easier to compare the results.