On a Unix/Linux box which language is faster, c or c++. Considering both higly optimized code(no stl, or templates), compiling with gcc/g++, and having the programs both performing the same thing.
That all depends on who's cutting the code! In theory, everything else being equal, C must be more efficient that C++ because there is more overhead with C++ due to the object oriented approach and richer functionality. Basically, the further you get away from assembler the more overhead there is in calling standard libary functions, etc., etc. Lets put it another way - the linux kernel is written in C not C++.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.