$ the-wire · showcase
SIMD vectors become comparable, amd64 gains LastIndexByte assembly
By RepoJournal · Filed · About Go · Composed from the cited sources · methodology
Austin Clements' SIMD work reached the language surface: simd/archsimd vectors and masks now compare with == and != and work as map keys, while the compiler stops forcing every SIMD type to the ANOALG algorithm.
simd, simd/archsimd: make vectors and masks comparable golang/go
Vectors and masks in simd and simd/archsimd now support == and !=, serve as map keys, and compare as interface values and in generic code. A vector compares like a struct with one field per element and a mask like a struct with one bool per element, so x == y is x.Equal(y).All(); per the commit, "like regular float comparison, NaN elements are never equal, and +0 equals -0."
cmd/compile: give SIMD types the equality algorithm of their fields golang/go
simdify previously gave every SIMD type the ANOALG algorithm, so no SIMD type could be compared or hashed whatever its fields; the compiler now gives these types the equality algorithm of their fields. This covers simd/archsimd's vector and mask types plus types defined in terms of them, in both package simd and archsimd on platforms where simd isn't emulated.
internal/bytealg: add LastIndexByte amd64 assembly implementation golang/go
Tobias Klauser added an amd64 assembly implementation of LastIndexByte that scans backward with the same chunking strategy as IndexByte, using BSR rather than BSF to find the rightmost match in each chunk. Benchmarked on a Ryzen 7 PRO 8840HS under linux/amd64.
internal/bytealg: restructure IndexByte SIMD path on loong64 golang/go
The loong64 IndexByte SIMD path now processes the length remainder first, following arm64, so the scalar tail fallback is gone entirely; per-block compare results merge via XVORV/VORV to leave a single not-found branch, and blocks are re-scanned only on a hit. Measured on Loongson-3C6000/S (linux/loong64).
loong64/loong64spec: new parser simdgen golang/arch
Also landed: a new PDF parser in loong64/loong64spec feeding information to the simd package, and {,x}vf{add/sub/mul/div}.{s/d} instruction support in cmd/internal/obj/loong64.