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

Languages that come from an era where total memory was measured in kbytes, cpus in megahertz and pointer arithmetic was as common as if statements, will always be performance kings.

It'll take a pretty significant shift to change this. Something like 100+ core cpus each running slow, might be such a shift.

Being surprised that C++ is faster than newer languages which provide all types of abstraction is like being surprise assembly is faster than C++.



You're mostly correct, but the code they wrote DID use fancy abstractions like hash tables, templates etc. C++ delivered on abstraction WITHOUT a performance penalty, which is what the C++ designers have claimed it could do since forever. Nice to see it verified again. I have no doubt that the C++0x syntactic sugar enhancements would have have also delivered the same high performance.


Indeed. I write a lot of Objective-C code, and still drop into C++ for the CPU heavy tasks. Swapping out NS* containers for std::* alone gives a fairly high boost in performance.

All the C++ hate is blown way out of proportion. C++ is a great tool when you need performance. Tuning C++ isn't that difficult either. Contrary to what a commenter said above, steering clear of C++ at all costs is not what you should be doing. You should know when and how to use C++. It's useful more often than many people here seem to think. Especially if you develop for mobile devices.


I've been pushed back into C++ out of necessity for some DSP work and I'm actually enjoying it quite a bit. It sucks for text processing but for other things it's really not so bad. As you say, with computing shifting back to underpowered devices C++ is having another day in the sun.




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

Search: