3 ms·
Anything that seems to demonstrate C++ as slower than C is implicitly busted. You could compile the C code with the C++ compiler and get the same speed. I'm lo
by ncmncm 6y ago
Anything that seems to demonstrate C++ as slower than C is implicitly busted. You could compile the C code with the C++ compiler and get the same speed.
I'm looking at their table 4, with C:1.0, C++:1.56.
This throws the whole paper into doubt. Comparing crappy code in one language with good code in another reveals little of substance.
- cozzyd 6y agoYou have to include the compile time for C++ and the servers for cppreference.com.
- higerordermap 6y agoThis is funny but you can install OS documentaion for libc++ on linux systems, and access them through man pages. As for compile time, the stuff is hard. There are some caching compilers, and build systems like bazel. A good build configuration can improve compile times.
- higerordermap 6y agoIdiomatic C++ has lot of performance pitfalls.
- Zelizz 6y agoC is not a true subset of C++ (though several compilers can handle both).
- ncmncm 6y agoThe difference between C and the C subset of C++ is negligible, for any practical purpose.