> What we are testing by running these programs is the overhead due to the choice of programming language.
That's just wrong. The first example is a perfectly fine hello world in C++. This is overhead due to the choice of API used to print to stdout
It's well known that a typical iostream implementation is slower than a typical printf implementation, which is why printf is still used in C++ and one of the reasons we got std::format in C++20