2 ms·
Likewise, performant C++ usually looks more like the "C with classes" that's widely disliked by the "modern C++" people.
by userbinator 7y ago
Likewise, performant C++ usually looks more like the "C with classes" that's widely disliked by the "modern C++" people.
- fwsgonzo 7y agoNot 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.