View Single Post
Old 2010-09-27, 17:55   #8
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
Rep├║blica de California

2D8A16 Posts
Default

Quote:
Originally Posted by ewmayer View Post
The general rule is: if you have a relatively small amount of code which dominates your compute time (e.g. a critical inner-loop section or macro), then ASM is worth playing with.
The general rule above has since been amended to read:

"If you have a relatively small amount of code which dominates your compute time (e.g. a critical inner-loop section or macro), or your algorithm can take good advantage of hardware-level parallel-execution units (and the instruction sets needed to access them) such as mmx, sse, avx or GPU coding then ASM is worth playing with.

And yes, since I wrote the comment excerpted at top of this message, I have gone over thoroughly to the dark side. In many ways, though, I'm glad I waited - SSE coding (most of what I use ASM for) is much more RISC-like than the 'standard' x86 ISA, and AVX (with its 3-register instruction format support) is more RISC-like still. In other words, it`s becoming less awkward to code in assembly all the time, especially relative to the resulting code speedups. But pre-SSE x86 floating-point ASM, with that awful stack-based resister access? Glad I "missed out" on that. That legacy x86 floating-point stuff gets filed as "If you weren't already doing it for a living, it probably wasn't worth learning".
ewmayer is online now   Reply With Quote