google/highway

Performance-portable, length-agnostic SIMD with runtime dispatch

What it solves

Highway is a C++ library designed to make SIMD (Single Instruction, Multiple Data) and vector programming practical and portable. It allows developers to write high-performance code that leverages CPU vector instructions across different architectures without having to write separate, architecture-specific intrinsics for each platform.

How it works

Highway provides a set of portable vector intrinsics that map directly to CPU instructions. It abstracts the hardware differences between various instruction sets (such as x86 AVX, Arm NEON, and RISC-V RVV), allowing the same application code to target multiple platforms. It supports both static dispatch (targeting a specific set of instructions at compile time) and dynamic dispatch (detecting the best available instruction set at runtime).

Who it’s for

It is intended for software engineers who need to push the boundaries of CPU performance in domains such as image processing, linear algebra, cryptography, video analysis, and compression.

Highlights

  • Broad Architecture Support: Supports 27 targets across x86, Arm, RISC-V, IBM Z, LoongArch, POWER, and WebAssembly.
  • Performance Portability: Enables 5-10x speedups and significant energy reduction by reducing the number of instructions executed.
  • Flexible Deployment: Supports runtime detection of the best available instruction set via dynamic dispatch.
  • Predictable Results: Offers functions that map well to CPU instructions, making code more robust than relying on compiler autovectorization.

Related

  • Project
  • Project
  • Project
  • Project