+ 3

Is c faster than c++ ??

lets say we have a program in c and we compiled it with c and c++ compilers. which program will run faster ?? the one which is compiled with c compiler or the one compiled with c++ compiler?? let's say we have gcc and g++

26th Nov 2017, 5:35 PM
SmitTheLinuxUser
SmitTheLinuxUser - avatar
3 ответов
+ 2
@Ace I have mentioned the implementations . GCC and g++.
26th Nov 2017, 6:42 PM
SmitTheLinuxUser
SmitTheLinuxUser - avatar
+ 1
Normally not, at least not significantly. I'd recommend you using c++ by default and c in some niche cases.
26th Nov 2017, 8:26 PM
Timon Paßlick
0
With respect to the very same code, C should be ever so slightly faster, in light of the fact that the executable can be smaller and this could decrease lookup time. This only apply in corner cases where the target system has super limited RAM (some embedded systems).
26th Nov 2017, 10:35 PM
Deb MacPackage