Linked by ebasconp on Fri 10th Jun 2011 22:22 UTC
Benchmarks "Google has released a research paper that suggests C++ is the best-performing programming language in the market. The internet giant implemented a compact algorithm in four languages - C++, Java, Scala and its own programming language Go - and then benchmarked results to find 'factors of difference'."
Permalink for comment 477083
To read all comments associated with this story, please click here.
Member since:

How do you suspect it performs in heavily threaded code? (you need mutexing both on the refcount and on your heap).

Faster than GC if it was to free memory at the same rate.
"...and the whole point is that you aren't doing it that way when you're dealing with GC, leading to scenarios where you get much better performance. Right tool for the job and all that, ever heard about it? ;)

Of course you can spend a lot of time developing a different approach in C++, or you can spend time writing a custom memory allocator with different characteristics, but that's not always time effective.

It is true that it is good enough for many more, and that it keeps dumb programmers from freeing used objects and the like.
You generally have to be more careful wrt. deallocation in GC languages since they typically only deal with memory rather than resources, whereas in C++ we can utilize the wonderful RAII. If you think Java and C# programmers are "dumb" and/or lazy because of GC, I suspect you haven't done much development in either of those languages.

Reply Parent Score: 1