Then you have various optimizations that come from things like templates, constexpr. Look at the qsort method - to have a modicum of genericity you need to pass a function that will be invoked. Instead, a C++ version would be able to be optimized to compare the elements directly, without calling a function, avoiding a big number of function calls.
There's no way to make C faster than well written C++. But C++ is complex and a lot of people write bad C++, that's why it has developed a bad reputation. It's really undeserved.
In theory `restrict` (to disallow pointer aliasing like in Fortran) could lead to optimization gains, same as not having exceptions (the possibility of exceptions prohibits certain optimizations of the C++ compiler).
https://github.com/hanabi1224/Programming-Language-Benchmark...
https://github.com/hanabi1224/Programming-Language-Benchmark...
https://stackoverflow.com/questions/2513741/c-vs-c-for-perfo...
from which I gather that if you're using an allocator function that zero's out memory then it will be slower of course.