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'."
Thread beginning with comment 476882
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Really?
by MacMan on Sat 11th Jun 2011 01:06 UTC in reply to "Really?"
MacMan
Member since:
2006-11-19

faster than programs coded in, say, assembly? I kind of find that hard to believe.

Very few people can write code as good as a modern C++ compiler.

I work with a guy who kept bragging about how great his LU factorization that he hand-coded directly in assembler is. Well, turns out this clown wrote it using the ancient x87 FP stack, he never heard of SSE (this was a few months ago).

So, I through together a quick and dirty LU factorization in C++ (OK, copied it out of numerical recipes), compiled it with gcc 4.4, enable SSE, and it was about 20 freaking times faster than his "hand tuned assembler"

And when the next great SSE 4,5,6... comes out, all I do is re-compile:)

Unless they have a really really good reason for doing it, when someone tells you they want to write something in assembler, you should probably back hand them.

Reply Parent Score: 4

RE[2]: Really?
by ebasconp on Sat 11th Jun 2011 01:19 in reply to "RE: Really?"
ebasconp Member since:
2006-05-09

Agree completely with you.

Assembler has THE POTENTIAL that could help writing the fastest algorithms; but just real geniuses get full advantage of such potential.

If you have 1000 man; all of them will be able to cut a wood into pieces; 20% of them will be able to build a chair with the wood but just one or two will be able to create a beautiful, durable, reliable chair ;)

Reply Parent Score: 4

Assembly
by jessesmith on Sat 11th Jun 2011 01:33 in reply to "RE: Really?"
jessesmith Member since:
2010-03-11

I've done some work in Assembly and I tend to agree with you. It is possible to make Assembly code that's smaller and more efficient than C/C++, but it is rarely worth it. And most people aren't going to write asm that's better than a modern compiler with optimizations turned on.

But it is nice to have the option of falling back on Assembly code when you really need to cut corners.

Reply Parent Score: 2

RE[2]: Really?
by panzi on Sat 11th Jun 2011 02:36 in reply to "RE: Really?"
panzi Member since:
2006-01-22

What did the guy say when you showed him your results?

Reply Parent Score: 2

RE[3]: Really?
by ebasconp on Sat 11th Jun 2011 02:59 in reply to "RE[2]: Really?"
ebasconp Member since:
2006-05-09

He actually said: "That occurred because you executed my program in client mode instead of server mode. That makes an enormous difference. Running it in server mode will almost always run circles around client mode." ;)

Reply Parent Score: 4

RE[3]: Really?
by MacMan on Sat 11th Jun 2011 14:34 in reply to "RE[2]: Really?"
MacMan Member since:
2006-11-19

What did the guy say when you showed him your results?


Not much, just kind of starred at me, then started saying some nonsense about how in Russia, everything is written in assembler because the the compilers are crippled by the CIA, or something to that extent.

Reply Parent Score: 2

RE[2]: Really?
by eldarion on Tue 14th Jun 2011 13:26 in reply to "RE: Really?"
eldarion Member since:
2008-12-15

Just a small note: it's assembly (the language), not assembler (the software that creates "object files" from assembly code).

Reply Parent Score: 1

RE[3]: Really?
by Neolander on Tue 14th Jun 2011 13:50 in reply to "RE[2]: Really?"
Neolander Member since:
2010-03-08

Just a small note: it's assembly (the language), not assembler (the software that creates "object files" from assembly code).

If he's French, he has half an excuse though : here, we say "assembleur" (which sounds like "assembler") for both ;)

Edited 2011-06-14 13:50 UTC

Reply Parent Score: 1