4 ms·
> 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
by jonathrg 4y ago
> 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
- guyomes 4y agoMoreover, if strings are the only thing to print, and speed is the only thing to care about, then "puts" is a good alternative too.