5 ms·
I program assembly as a large part of my daily job, and we generally target between 500% and 1500% speedup for our assembly routines. That number being compared
by kitsuac 10y ago
I program assembly as a large part of my daily job, and we generally target between 500% and 1500% speedup for our assembly routines. That number being compared to C code with all compiler optimisations enabled. 1.0x - 2.4x is indeed pretty awful, but it does sometimes happen. For example, many algorithms are fundamentally serial in nature (e.g. entropy decoding).
- gregschlom 10y agoI'm curious: what kind of job requires assembly programming nowadays? high frequency trading? game dev? neural networks?
- kitsuac 10y agoI work with video codecs now, but anything computationally intensive and/or close to the hardware will benefit from some assembly code. The three that you mentioned are good examples. The web browser you're using to view and respond to this thread is another example. Among other things, the JavaScript engine most likely does dynamic recompilation and it may use sandboxed webviews.
- bogomipz 10y agoCould you elaborate on how assembly is used in sandboxed webviews?
- kitsuac 10y agoI'm not sure to what extent exactly, but iirc they instrument APIs and pass them through IPC. It may not really be the best example, for some reason it popped into my head but maybe it was an incorrect assumption.
- aseipp 10y agoCryptography, image/video processing, scientific computation (analysis/physics etc), game dev/graphics, microcontrollers/embedded devices, hardware interfaces, compiler/language development. There are probably at least a dozen more major areas I'm forgetting. I've at least used assembly for 3 of those myself (crypto/hw interfacing/compiler dev). It's maybe niche, as far as the job market/skills go, but when you think about it, a hell of a lot of the stuff on a modern Linux system you might use every day is powered by hand-optimized assembly. If you're even visiting this webpage -- the cryptographic stack your browser uses to negotiate TLS, with almost 100% certainty, relies on deep assembly optimization. JavaScript engines are relentlessly optimized at these levels. Any time you visit a page and render an image, systems like libjpeg-turbo are, in no small part, a piece of the puzzle. Using disk encryption or ipsec, too? Assembly in your kernel. It's everywhere!