2 ms·
Not really, it's more trying to use constexpr better and measuring everything as well as inlining as much as you can. This leads to extra compile times which yo
by fwsgonzo 6y ago
Not really, it's more trying to use constexpr better and measuring everything as well as inlining as much as you can. This leads to extra compile times which you can combat with precompiled headers. Overall C++ just wins out heavily. Not because C is worse, but because the C codebases I've looked at tend to not put code in headers.
C also has a lot of void* which prevent the compiler from doing optimizations it otherwise could. C lacks template programming, which means they will try to reuse the same containers for everything, again lowering performance. Typically some kind of list based on macros.
https://stackoverflow.com/questions/4707012/is-it-better-to-use-stdmemcpy-or-stdcopy-in-terms-to-performance https://stackoverflow.com/questions/4707012/is-it-better-to-...
Just std::copy alone. I really could go on forever.