Live data from Hacker News

Ask HN: What is hand-coded assembly language used for these days?

news.ycombinator.com

1–10 of 60 posts

Ask HN: What is hand-coded assembly language used for these days?

#1
What is hand-coded assembly language used for these days?

To put that another way, in the current marketplace, what kinds of program are so worthy of optimization that it's economically sensible to have a human spend several days hand-tuning machine language to squeeze out every CPU cycle?

Re: Ask HN: What is hand-coded assembly language used for these days?

#5
Anything that's worth spending time to do fast is worth spending time writing SIMD assembly for.

You can get 5x, 10x, 20x, or more performance increases just by using the vector instructions given to you by the CPU. Until a magic compiler appears that can make proper use of them (read: never), hand-coded assembly will be critical for almost any application for which performance is critical, especially multimedia processing.

Re: Ask HN: What is hand-coded assembly language used for these days?

#7
I did some assembly optimization for an internal RTL-level simulator. We had ~1000 machines on a three year upgrade cycle, i.e., we upgraded 333 machines / year = $333k / year. Lets say I cost the company $200k / year. Several days = perhaps $2k, so I'd only need to get a .6% speedup for it to be worth it, not even including the cost of powering and maintaining our machines.

When I worked on it, our simulator was an order of magnitude faster than commercially available simulators (Synopsis VCS and Cadence NC-Verilog), which cost between $1k and $10k per license per year. I worked for a tiny hardware startup; established hardware companies use a few orders of magnitude more compute power than we did, so the equation is probably at least four orders of magnitude further in favor of doing assembly optimization in a commercial simulator.

Post reply on HN