So, I'm working on the proposal to get std::byte streams into C++. I already got the official paper number and looking forward to see it discussed in November New York ISO meeting.
The ultimate test of my proposal is to compare performance of file IO to what already exists in the standard. And C has FILE* based IO functions such as fopen, fread, fwrite, etc. So I've run a benchmark and guess what, I'm 30% faster in sequential reads and 38% faster in sequential writes than C.
That's pretty showing. And the only approach I use is to align syscalls with file system sectors, that's pretty basic. Why I win is because C doesn't have templates and constexpr which allow compiler to see through the code and optimize better. In fact, 90% of my code here is constexpr so it gets folded pretty directly to syscalls. I didn't even try to micro-optimize with [[likely]] and [[unlikely]]. These don't exist in C18 and are only expected in C2X, whenever that comes.
What I'm saying is, the people who blindly say that C is faster in C++ could be right in 1990s or 1980s, but modern C++ is years ahead of C in almost everything, including performance. Let the myth die and let people stop using dinosaur like C.