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 solves the problem of writing high-performance code that can run efficiently across different CPU architectures without needing to rewrite the core logic for every specific instruction set.
How it works
Highway provides a set of portable vector intrinsics that map directly to CPU instructions. Instead of writing architecture-specific code, developers use Highway's functions, which the library then maps to the appropriate instructions for the target platform. It supports both static dispatch (targeting a specific set of instructions at compile time) and dynamic dispatch (choosing the best available instruction set at runtime).
Who it’s for
It is intended for software engineers who need to push the performance boundaries of their applications, particularly in domains like image processing, compression, video analysis, linear algebra, cryptography, and robotics.
Highlights
- Broad Architecture Support: Supports seven different architectures, including x86, Arm, RISC-V, WebAssembly, IBM Z, LoongArch, and POWER.
- Performance Gains: Can reduce energy usage and provide speedups of 5-10x by executing fewer instructions.
- Flexible Deployment: Allows applications to run on heterogeneous clouds or client devices by selecting the best available instruction set at runtime.
- Predictable Results: Offers a more robust and predictable alternative to compiler autovectorization.
- Extensive Operation Set: Includes tools like Gather, MaskedLoad, and FixedTag to optimize legacy data structures and scalable vectors.
Related
- Project
- Project
- Project
- Project