"But for the absolute core of the system—the inner loops of the index servers, for instance—very small gains in performance are worth an awful lot. When you have that many machines running the same piece of code, if you can make it even a few percent faster, then you’ve done something that has real benefits, financially and environmentally. So there is some code that you want to write in assembly language."
Ask HN: What is hand-coded assembly language used for these days?
41–50 of 60 posts
Re: Ask HN: What is hand-coded assembly language used for these days?
#42Re: Ask HN: What is hand-coded assembly language used for these days?
#43Earlier 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.
Re: Ask HN: What is hand-coded assembly language used for these days?
#44Earlier 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.
http://www.cconcepts.co.uk/products/publish.htm http://www.cconcepts.co.uk/products/artworks.htm
Although I wouldn't recommend choosing assembler for a destkop app, but it made sense when they were written. And I still think Impression beats many a word processor and DTP package available today, and it ran in 2MB of memory with no hard disc.
Re: Ask HN: What is hand-coded assembly language used for these days?
#45Inner loops of graphics algorithms - Picasa, Photoshop, etc.
Tangentially related but not quite the same, I work at a company that makes barcode recognition software and some of our most performance-sensitive areas use assembly. It is mostly C, though.
Re: Ask HN: What is hand-coded assembly language used for these days?
#46Earlier quoted context omitted.
People are still playing C&C: RA2?!
Come on, people are playing all kinds of games! 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 f…
Re: Ask HN: What is hand-coded assembly language used for these days?
#47Going the other way around - can anyone think of an open source project that could benefit from some assembly optimization, and isn't? I'd love an excuse to play with this stuff in a useful fashion. (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?
#48Earlier quoted context omitted.
That has more to do with reading assembly than writing it by hand.
There are certainly people who write shellcode. As I understand it, people have written shellcodes that use only bytes that happen to map to ASCII, are obfuscated to bypass intrusion detection systems, and so on. I'm sure it requires quite a bit of (specialized) knowledge.
Re: Ask HN: What is hand-coded assembly language used for these days?
#49Earlier quoted context omitted.
That has more to do with reading assembly than writing it by hand.
Actually, no. If you're dealing with obfuscation, IDS and antivirus evasion etc. you need to know how to read, write and otherwise manipulate assembly code (debug, self-modification, name-it).
Second, for every 100 people that talk about e.g. self-modifying viruses or shellcode, there is perhaps 1 person who can actually write something soup-to-nuts, and maybe 5-10 more who can modify that code to make it do something new.
Reading assembly is important for security research. Writing, not as much.
Re: Ask HN: What is hand-coded assembly language used for these days?
#50It's used in bits of kernel programming - often because there is no other way to do the task.
In all of xnu, not counting AES, there are ~17kloc in x86 assembly, most of it in osfmk/i386 --- where no normal developer is ever going to go. There are over 730kloc in C.