Hacker News new | past | comments | ask | show | jobs | submit login

Wow.

Looks like C++ is still one of the performance kings among current programming languages. Can't say I enjoy using it though.

It also looks like Go and Scala have a long way to go on compiler optimization. Not surprising, since they're young languages compared to C++ and Java, and it's a decent amount of work to optimize the higher-order constructs they provide.




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.


Sweet $deity, the Scala compiler is so painful! You changed one line of code in a 40KLOC code base, now you wait 40s for the recompile.


Is it hard to use fsc? Fsc should fix those compile times, especially for minimal changes. In the paper it reduced compile time to 25-33% of scalac's compile time. (13.9s to 3.8s and 11.3s to 3.5s)


I'll check it out; thanks for the tip!


nobody uses the Scala compiler that way. It is common to use FSC or the Simple Build Tool to compile incrementally


I was talking about incremental compiles (one loop around sbt ~test-compile), on a laptop, with a web browser open. Colleagues have benchmarked SSD compiles at 5x+ faster.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: