Performance – Software vs. Hardware Optimization Impact

optimizationperformance

I was wondering how software optimization and hardware optimization compare when it comes to the impact they have on speed and performance gains of computers.

I have heard that improving software efficiency and algorithms over the years has made huge performance gains. Obviously both are extremely important, but what has made the bigger impact in the last 10, 20 or 30 years?

And how do hardware changes affect the software changes? How much of software optimization is a direct result of hardware improvements and how much is independent of the hardware?

To be clear, I am asking about software optimizations at the level of compilers and operating systems. Obviously using better high level-algorithms will result in the largest speed ups (think: quick-sort vs. bubble-sort), but this question is about the underlying reason why computers are faster today, in general.

Best Answer

The bigger increase in performance definitely comes from hardware.

In terms of software, one of the biggest changes in the past 30 years is that we don't write nearly as much low level code as we used to. For example, software now relies on automatic compiler optimizations as opposed to hand written assembly, and makes extensive use of existing frameworks and patterns which have matured in the past few decades. On the other hand, software has become increasingly complex, and there have been corresponding performance hits.

However, hardware capabilities have improved mostly in accordance to Moore’s Law, and CPU speeds and memory bandwidth have increased hundreds of times over the past 30 years. Manufacturing processes have improved, allowing components to become smaller and faster because more transistors can be packed together. One of the biggest things which has sped up computers is memory access and usage of caching. CPU cache sizes are now bigger than total RAM used to be, and low level programs have shifted to make better use of this. Also, when 64 bit CPUs became commonplace, a corresponding instruction set (i.e. x86-64, the use of which might still qualify as “software”) was required to take proper advantage of this. In that way, it is a combination of improvements in hardware, that are taken better advantage of by shifts in software design.

In short, the biggest incremental strides in performance come from hardware – however changes to software are often required to make optimal use of new hardware. Either one doesn’t really work without the other!

Related Topic