To read all comments associated with this story, please click here.
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.
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 
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.





Member since:
2005-07-13
faster than programs coded in, say, assembly? I kind of find that hard to believe.