Larry’s Personal & Tech ramblings

Just another WordPress.com weblog

Why write in Assembly Language?

I’ve been asking myself this question for a long time.  As much as I hate the argument “machines are so fast, there’s no need for assembly language”, it’s starting to ring true.  Over the past several years I have written plenty of assembly language, but it’s been ARM, not X86.  I’ll probably never rewrite my 68k emulator in x86 because there’s just no need.  It’s more about what products I’m working on than about the “need” to write in asm.  I haven’t written a desktop PC product in a long time and the last time I did, I used some x86 asm.  The x86 is just such a mess of a design with insufficient registers that you can always beat the compiler with hand written asm.  I just don’t have any programs which need the speed.  If I were writing software to process video or audio (e.g. convert WMA to MP3), I would certainly write the inner loop in asm.  Such a large task should be done as quickly as possible (especially video conversion which can make you wait a long time).  I definitely enjoy coding on the bare metal and I’m sure I’ll be writing ARM asm for a long time, but I’ll probably never write another line of x86 asm (unless a job forces me to).

March 23, 2007 Posted by bitbank | arm, asm, assembly language, performance, tech, x86 | | 5 Comments