“Hardware acceleration” is an option you may have spotted tucked away in the options menu of various applications across many of your devices, including your Android smartphone. While not always an accessible option in most smartphone apps, hardware acceleration is used by a number of popular Android apps, including YouTube, Chrome, Facebook, and more.
Use cases for hardware acceleration range from more efficient video and sound rendering, through smoothing out text, and speeding up 2D graphics and UI animations. In a nutshell, if you have the option, it’s best to use hardware acceleration, unless it causes some fault or bug.
If you’ve ever wondered what hardware acceleration is and whether or not you should enable it, you’ve come to the right place.
What is hardware acceleration?
The name gives the game away here — hardware acceleration uses dedicated hardware to accelerate a task so that it runs faster and/or more efficiently than on the CPU alone. Most commonly, this involves offloading processing to the graphics processing unit (GPU), digital signal processor (DSP), or some other hardware block that’s specialized on a specific task.
If this all sounds a bit familiar to heterogeneous computing, you’d be right. However, commonly used types of acceleration are often exposed through the operating system to app developers, rather than relying on a dedicated platform SDK to access the various computing components. With acceleration disabled, CPUs are still able to run the required function in software, albeit slower than on dedicated hardware.
Hardware acceleration invokes a specialized processor to speed up common, complex tasks.
One of the most common use cases for hardware acceleration is video encoding and decoding. For example, rather than decoding a video stream on the CPU, which isn’t very efficient, graphics cards or other hardware often contains dedicated video encode/decode blocks that can do the task much more efficiently. Likewise, decompressing an audio file can often be done faster on a DSP or sound card than on the CPU.
Another very common use for hardware acceleration is 2D graphics acceleration. User interfaces, for example, often feature lots of graphics, text, and animations to render. This can be done on the CPU, but a GPU or display processor is a lot faster at this type of operation. Tasks could include applying an antialiasing filter to text so it appears smoother, or layering a semi-transparent overlay on top of another element like a video. Other advanced graphics examples include accelerating physics and ray-traced lighting.
Why hardware acceleration matters
The CPU is the generic workhorse of any computer system. It’s designed to handle virtually any task that can be thrown at it, but this flexibility means it’s often not the most efficient way to accomplish specific tasks, especially those that require lots of repeated math functions like video decoding or graphics rendering.
Improving battery life, performance, and responsiveness is the aim of the game.
Hardware acceleration offloads common tasks from the CPU to specialized hardware that can not only run the task faster but also much more efficiently. This means that devices run cooler and batteries last for a lot longer. So you’ll be able to watch many more high-quality videos on a single charge when using a dedicated video decoder block versus running the algorithm on the CPU. Not forgetting that this also frees up your CPU to do other things in the meantime, making apps feel more responsive.
The tradeoff is that including extra processing hardware for specific features has a cost, both in terms of development costs and also silicon area. Decisions have to be made about which features are worth supporting with hardware, such as very popular video codecs, and which don’t quite meet the desired cost/benefit ratio.
Hardware acceleration has become an important tool in computer systems ranging from high-performance PCs to low-power smartphones. The use cases for dedicated hardware are only growing with the introduction of machine learning applications. That said, most of the time hardware acceleration is just being used to save on battery life while streaming videos from YouTube.
Read next: What’s the difference between a CPU and a GPU?