Earlier quoted context omitted.
Well, you can still use C with GCC and Intel intrinsics I guess.
Intrinsics are still worse (performance-wise) than hand-coded assembly, for two reasons. The first reason is the whole category of optimizations that the compiler is worse than a human at (like register allocation) or cannot do effectively at all (messing with calling conventions, computed jumps). The second reason is more subtle: in any case that you abstract yourself from some part of a problem, you inherently crea…
Ask HN: What is hand-coded assembly language used for these days?
31–40 of 60 posts
Re: Ask HN: What is hand-coded assembly language used for these days?
#32(I love what I do, but my twelve year old self would be disgusted that I'm not writing games.)
Re: Ask HN: What is hand-coded assembly language used for these days?
#33Debugging and reverse engineering games. When publishers/developers don't give a bleep, the fans take up the task of fixing the bugs themselves. I happen to run one such project in my spare time (for C&C: Red Alert 2), and it's amazing how much stuff is broken. It's not as "serious" as other projects mentioned here, but still a reason to know ASM. (And a good way to see bad programming practices in action :) )
Re: Ask HN: What is hand-coded assembly language used for these days?
#34Earlier quoted context omitted.
A compiler can't be made to make proper use of vector instructions? Why is that?
It is an extraordinarily difficult problem to transform scalar code into vector instructions. The only way to get even passable output from a vectorizing compiler is to write the code as vectors to begin with, such as with cross-platform assembly tools like Orc. And even then you'll often end up significantly worse off than if you wrote the assembly by hand. A run of Intel's compiler on the C versions of our DSP func…
Re: Ask HN: What is hand-coded assembly language used for these days?
#35Debugging and reverse engineering games. When publishers/developers don't give a bleep, the fans take up the task of fixing the bugs themselves. I happen to run one such project in my spare time (for C&C: Red Alert 2), and it's amazing how much stuff is broken. It's not as "serious" as other projects mentioned here, but still a reason to know ASM. (And a good way to see bad programming practices in action :) )
People are still playing C&C: RA2?!
I'm sure people still play Master of Magic, a strategic game from 1994. I've been playing it on and off since it came out, and I began to think - is it something wrong with me that I like this old game so much? I mean, surely there must be newer games that are better. I showed it to my teenage brother in the mid 2000's and he loved it too. I had my non-computer-gaming friends blown away by the original Heroes of Might and Magic (1995).
I think the world needs better means for preservation of old computer games.
Re: Ask HN: What is hand-coded assembly language used for these days?
#36Re: Ask HN: What is hand-coded assembly language used for these days?
#37Re: Ask HN: What is hand-coded assembly language used for these days?
#38Re: Ask HN: What is hand-coded assembly language used for these days?
#39I did some assembly optimization for an internal RTL-level simulator. We had ~1000 machines on a three year upgrade cycle, i.e., we upgraded 333 machines / year = $333k / year. Lets say I cost the company $200k / year. Several days = perhaps $2k, so I'd only need to get a .6% speedup for it to be worth it, not even including the cost of powering and maintaining our machines. When I worked on it, our simulator was an…
Re: Ask HN: What is hand-coded assembly language used for these days?
#40Earlier quoted context omitted.
Having read and written assembly on a daily basis for years, I have to disagree entirely. The only simple thing about assembly is that it happens to map to machine code directly, but macros and quasi-instructions even make that iffy. There are so many idiosyncrasies in every ISA, so many ways in which the code you write has side effects. Assembly isn't just complex in practice, it's complex in concept. If you want si…
Try ARM. x86 assembly is ugly and wart ridden. ARM is like a breath of fresh air. Unbelievably well designed.
15 years ago, I did Intel-style assembly--and loved it even with all its clumsiness. But I just dove into ARM a few weeks ago, and am loving it even more. Such sweet pleasure to code so close to such a beautiful and simple machine!