Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMVU hand-rolled its SSE skinning loops and parts of the software 3D lighting code, because only 2/3 of our customers have GPUs. We need to run well on five-year-old Dells with Intel graphics. (Direct3D on Intel isn't as good as a dedicated software renderer. We chose RAD's Pixomatic.)

In addition, look at how popular netbooks are becoming. The Intel Atom is an in-order CPU. Imagine a hyperthreaded, 1.6 GHz 486...

On the iPhone it's even worse. It's got a decent vector unit, but the CPU is very slow. You'll see great wins by doing your 3D math yourself.

As we continue to become multicore, I could imagine somebody shaving a couple cycles out of the core message passing routines, though you're almost certainly bus bound in those situations...

Computers are getting smaller and people want more out of them; assembly language is back in style!



Oh, I forgot about another huge case for writing assembly language... These days, we have tons of different languages talking to each other, all in the same program. In Mozilla, for example, JavaScript talks to C++ objects via XPCOM/XPIDL. Since the C++ objects expect data laid out on the C stack in a certain order and JavaScript has no notion of the C stack, there is a bit of platform-specific assembly code in the middle that takes the JavaScript values, places them on the stack, and jumps into the C++.

I'm guessing that most languages with built-in foreign function interfaces (like Python's ctypes) have similar thunking layers.


Mozilla also use assembly for heavily used computationally expensive operations like image decoding. mmoy’s work is worth looking at:

https://bugzilla.mozilla.org/buglist.cgi?query_format=advanc...


Exactly for this reason I found myself writing assembly again: Invoke C functions from a scripting language. The last I wrote was probably 15 years back.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: