Show HN: Go-Highway – Portable SIMD for Go

https://github.com/ajroetker/go-highway
by kingcauchy • 7 months ago
29 2 7 months ago

Go 1.26 adds native SIMD via GOEXPERIMENT=simd. This library provides a portability layer so the same code runs on AVX2, AVX-512, or falls back to scalar.

Inspired by Google's Highway C++ library.

Includes vectorized math (exp, log, sin, tanh, sigmoid, erf) since those come up a lot in ML/scientific code and the stdlib doesn't have SIMD versions.

algo.SigmoidTransform(input, output)

Requires go1.26rc1. Feedback welcome.

Related Stories

Loading related stories...

Source preview

github.com