C or C++: Which one has better performance?

  • C
  • C++
Please select one to answer and see the result

Answers

C - 3C++ - 1
  • Anonymous . 3+ yrs. ago
C is a basic laguage used in designing of operating systems
  • Anonymous . 3+ yrs. ago
The return values of c++ can be very large, generating vtables for virtual functions have there overhead
  • Anonymous . 3+ yrs. ago
just read it in your doc.
  • Anonymous . 3+ yrs. ago
Theoretical:

Hand coded C will usually be 'faster' than C++. But with a good compiler, and well written code, C++ can come to par with C performance.

Practical:

With a programmer (good, bad, whatever), and a really large project, C++ can easily be FASTER than the C version. In C, it's hard to support things like std::vectors which reallocate twice the container size for optimized push_back()s, among other things, without reusing code, and making the program many times larger than it needs to be.

Related Questions

Related Comparisons