An excerpt from the repository, fetched Nov 13, 2026.
Read the project’s introduction
Efficient and performance-portable vector software
Highway is a C++ library that provides portable SIMD/vector intrinsics.
Documentation
Previously licensed under Apache 2, now dual-licensed as Apache 2 / BSD-3.
Why
We are passionate about high-performance software. We see major untapped
potential in CPUs (servers, mobile, desktops). Highway is for engineers who want
to reliably and economically push the boundaries of what is possible in
software.
How
CPUs provide SIMD/vector instructions that apply the same operation to multiple
data items. This can reduce energy usage e.g. fivefold because fewer
instructions are executed. We also often see 5-10x speedups.
Highway makes SIMD/vector programming practical and workable according to these
guiding principles:
Does what you expect: Highway is a C++ library with carefully-chosen
functions that map well to CPU instructions without extensive compiler
transformations. The resulting code is more predictable and robust to code
changes/compiler updates than autovectorization.
Works on widely-used platforms: Highway supports seven architectures; the
same application code can target various instruction sets, including those with
'scalable' vectors (size unknown at compile time). Highway only requires C++17
(language features, not necessarily the library) and supports four families of
compilers. If you want to use Highway on other platforms, please raise an issue.
Flexible to deploy: Applications using Highway can run on heterogeneous
clouds or client devices, choosing the best available instruction set at
runtime. Alternatively, developers may choose to target a single instruction set
without any runtime overhead. In both cases, the application code is the same
except for swapping HWY_STATIC_DISPATCH with HWY_DYNAMIC_DISPATCH plus one
line of code. See also @kfjahnke's
introduction to dispatching.
Suitable for a variety of domains: Highway provides an extensive set of
operations, used for image processing (floating-point), compression, video
analysis, linear algebra, cryptography, sorting and random generation. We
recognise that new use-cases may require additional ops and are happy to add
them where it makes sense (e.g. no performance cliffs on some architectures). If
you would like to discuss, please file an issue.
Rewards data-parallel design: Highway provides tools such as Gather,
MaskedLoad, and FixedTag to enable speedups for legacy data structures. However,
the biggest gains are unlocked by designing algorithms and data structures for
scalable vectors. Helpful techniques include batching, structure-of-array
layouts, and aligned/padded allocations.
We recommend these resources for getting started:
SIMD programming with Highway talk
SIMD for C++ Developers
Algorithms for Modern Hardware
Optimizing software in C++
Improving performance with SIMD intrinsics in three use cases
Examples
Online demos using Compiler Explorer:
multiple targets with dynamic dispatch
(more complicated, but flexible and uses best available SIMD)
single target using -m flags
(simpler, but requires/only uses the instruction set enabled by compiler
flags)
We have prepared several tutorial-like examples in hwy/examples; see the
README.md there for more information.
Basics:
sum_array_advanced.cc: 4x unrolling and remainder handling.
dot_product_unroll.cc: similar to sum_array_advanced, plus reduction.
matrix_transpose_scatter_gather: shows/compares Scatter and Gather.
Infrastructure:
benchmark.cc: dot product with remainder-free loops and benchmarking.
profiler_example: shows how to use the our built-in profiler for measuring
the time cost of annotated zones.
skeleton*: a complete example of a module with runtime dispatch.
Challenges:
masks_and_logic.cc: visualizes masks/comparisons with ASCII art.
ctf_aes.cc: capture the flag, brute-force AES password guessing.
We observe that Highway is referenced in the following open source projects,
found via sourcegraph.com. Most are GitHub repositories. If you would like to
add your project or link to it directly, feel free to raise an issue or contact
us via the below email.
Audio: Zimtohrli perceptual metric
Browsers: Chromium (+Vivaldi), Firefox (+floorp / foxhound / librewolf /
Waterfox)
Computational biology: RNA analysis,
long-sequence preprocessing
Computer graphics: ghostty-org/ghostty,
Sparse voxel renderer,
tgfx 2D Graphics library
Cryptography: google/distributed_point_functions, google/shell-encryption
Data structures: bkille/BitLib
Image codecs: eustas/2im,
Grok JPEG 2000,
JPEG XL,
JPEGenc,
Jpegli,
libaom,
OpenHTJ2K
Image processing: awxkee/aire, cloudinary/ssimulacra2,
libvips, m-ab-s/media-autobuild_suite,
Image viewers: AlienCowEatCake/ImageViewer, diffractor/diffractor,
Lux panorama/image viewer,
mirillis/jpegxl-wic
Information retrieval:
iresearch database index,
michaeljclark/zvec,
nebula interactive analytics / OLAP,
ScaNN Scalable Nearest Neighbors,
Machine learning: array2d/deepx,
gemma.cpp, Tensorflow, Numpy,
zpye/SimpleInfer
Programming languages:
AOT-compiled python, oven-sh/bun, V8/V8,
yinqiwen/rapidudf
Robotics:
MIT Model-Based Design and Verification
Vector search: 1yefuwang1/vectorlite, vespa-engine/vespa
Other
Evaluation of C++ SIMD Libraries:
"Highway excelled with a strong performance across multiple SIMD extensions
[..]. Thus, Highway may currently be the most suitable SIMD library for many
software projects."
zimt: C++11 template library to process n-dimensional arrays with multi-threaded SIMD code
vectorized Quicksort (paper)
Highway can also be installed via a package manager or from a repository:
Click to expand BSD repositories
DragonFlyBSD
FreeBSD
GhostBSD
MidnightBSD
Click to expand cross platform package repositories
conan-io
conda-forge
EasyBuild
Homebrew
microsoft/vcpkg
spack
xmake-io/xmake-repo
Click to expand linux package repositories
Obtained from repology
Click to expand Windows package repositories
fd00/yacp
MSYS2
Click to expand other operating
Read the full README on GitHub