Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Don't believe one benchmark.

In reality any C++ code can (and it's internally) translated to C one (that's called the front-end compiler). The back-end is the same.

The only difference is when there are things required by the C++ runtime (mainly exceptions and RTTI, and in some sense virtual functions).

I'm sure that if you take a "C" code, and compile it under "C++" compiler (given that it can compile) - you won't see difference.

Please disassemble it, and see for yourself.

That's the other problem with C++ - no one actually for real writes in full C++ - you always end up sacrificing features (exceptions most notably) to have running on embedded systems, or game consoles. And no RTTI there too.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: