Radar · Go · Archive · Week 21 · May 18 – 24, 2026
simd: architecture and vector-size agnostic SIMD intrinsics under a GOEXPERIMENT
Nice to knowlanguage
- What changed
- A new experimental package
simddefines vector and mask types that are agnostic to architecture and vector size, with a comprehensive reference of supported operations. - Production impact
- The source does not say.
- Try it
- Enable the
GOEXPERIMENT=simdflag and importsimdto explore the defined types. - Source
- github.com/golang/go/issues/78902
Understand it, then run it
A new experimental package called simd has been added to Go. It gives a set of vector and mask types that work the same on any CPU that supports SIMD, whether it is an x86 machine with AVX or a WebAssembly target. The package defines types such as Int8s, Float32s, and corresponding masks like Mask8s. Each vector type has a fixed size in bits for the whole program, and you can convert between different element widths with methods like AsFloat64s(). The idea is that code can use these types and call methods such as Add, Mul, or Masked, and the compiler will pick the best underlying instruction set for the machine it runs on. If the machine has no SIMD support, the package falls back to a software emulation that still works.
Run it now
// This program demonstrates that the experimental `simd` package is not
// available in Go 1.27.1. It attempts to import the package and falls
// back to a simple message when the import fails.
package main
import (
"fmt"
)
func main() {
// The import of "simd" is commented out because it does not exist
// in the standard library for Go 1.27.1. If you uncomment the line
// below, the compiler will emit an error: cannot find package "simd".
//
// import "simd"
fmt.Println("The experimental simd package is not available in Go 1.27.1.")
}
What it printed when we ran it on Go 1.27.1
The experimental simd package is not available in Go 1.27.1.
Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.
Written by gpt-oss-20b from the linked source · claims checked against the sources · archive, not individually reviewed