💡Go 1.26 and 1.27 Add Experimental SIMD APIs
Go now has native SIMD support for faster data crunching
TL;DR
Go 1.26 and 1.27 introduce experimental SIMD APIs, enabling faster data processing and computation. This is a big deal for developers working on computationally-intensive tasks like cryptography and AI.
Go 1.26 and 1.27 introduce experimental SIMD APIs, allowing developers to leverage the native SIMD capabilities of modern CPUs for faster data processing and computation. This is a big deal for anyone working on computationally-intensive tasks like cryptography, data processing, and AI. The new APIs support various platforms including amd64, arm64, and wasm, with specific instruction sets like AVX, AVX2, and NEON. The APIs aim to provide a consistent interface across platforms, hiding differences in vector sizes and instruction sets.
Key Points
Go 1.26 and 1.27 introduce experimental SIMD APIs for amd64, arm64, and wasm platforms.
The APIs support AVX, AVX2, and AVX512 on amd64, NEON on arm64, and wasm's SIMD instructions.
Go's new SIMD package supports vectors of 128, 256, and 512 bits on amd64, and 128 and 256 bits on loong64.
The package supports masked loads and stores on AVX, AVX2, AVX512, NEON, and wasm.
The package includes arithmetic operations, vector masking, loading and storing vectors, and reducing vectors.
Why It Matters
If you're working on computationally-intensive tasks like cryptography or AI in Go, the new SIMD APIs can significantly speed up your code. For example, a Go crypto library using SIMD can see up to 37% faster performance. However, the APIs are experimental, so stability and full platform support are still evolving.
Comments
Be the first to comment
Enjoyed this article?
Get it daily. 7am. Free. Reads in 5 minutes.
Join 3,507 builders reading daily.