首页›The Go Blog›文章

Arch-specific SIMD in Go

Junyang Shao and David Chase · 2026年10月2日

AI 摘要 AI 生成,可能有误

Go 1.27 将 Go 1.26 中引入的实验性 SIMD 支持从 amd64 扩展到 arm64 和 wasm,可通过 GOEXPERIMENT=simd 并经由低层级的 simd/archsimd 包使用。该 API 使用合理且统一的方法名称(如 Add 和 ShiftAllLeft),并依靠编译器优化来隐藏掩码指令和 128 位通道边界等硬件细节,同时仍公开伽罗瓦域仿射变换和矩阵转置等架构特定的操作。作者介绍了该包的类型系统、命名约定、零成本位重解释和不透明掩码类型,并欢迎就易用性和性能提供反馈。

The Go Blog

Arch-specific SIMD in Go

Junyang Shao and David Chase
2 October 2026

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 The Go Blog

Go Turns 17

AI 摘要Marking the 17th anniversary of Go's open source release, the Go team reflects on a year that included Go 1.26 and Go 1.27, delivering improvements such as generic methods, a redesigned encoding/json/v2 with up to 10× faster unmarshaling, a production goroutine leak profiler, the default Green Tea garbage collector, experimental SIMD support, and post-quantum cryptography. The team also emphasizes rapid ecosystem defense, exemplified by an urgent security release addressing the eMudhra certificate key disclosure incident within hours. Throughout, Go aims to remain grounded in simplicity, reliability, efficiency, and compatibility while adapting to modern hardware and serving both human developers and AI-assisted development.

A new Go API for JSON

AI 摘要This Go Blog post announces that the new encoding/json/v2 and encoding/json/jsontext packages are stable and generally available in Go 1.27, addressing long-standing shortcomings of the original encoding/json package, including behavioral flaws (such as accepting invalid UTF-8 and duplicate object member names), API deficiencies, and performance limitations that cannot be fixed within the Go 1 compatibility promise. The new architecture separates syntactic encoding/decoding (handled by jsontext with true streaming support) from semantic marshaling/unmarshaling (handled by json/v2), with options as first-class arguments and new streaming-oriented interfaces like MarshalJSONTo and UnmarshalJSONFrom. The v2 API is designed to fix these problems while remaining familiar enough that existing v1 usage can migrate with mostly the same behavior.

Our Response To The eMudhra Key Disclosure Incident

AI 摘要The Go security team responded to a critical PKI compromise involving eMudhra intermediate certificates whose weak private keys could be recovered in microseconds, potentially enabling attackers to impersonate any TLS server. Within roughly seven and a half hours of being notified, they shipped their first-ever URGENT track security release (Go 1.27.3 and 1.26.10) blocking trust in the compromised certificates. The team also outlined lessons learned, including plans to improve release efficiency and bring certificate revocation support parity to Linux, possibly via the upki project.

Help set Go's priorities for next year

AI 摘要The 2026 Go Developer Survey is now open through November 3, and the Go team encourages all developers to participate since their feedback directly shapes the team's priorities. Last year's survey drew 5,379 responses, with the top frustration being adherence to best practices and Go idioms, which led to a rewritten go fix in Go 1.26 and additional modernizers in Go 1.27. Results from this year's survey will be shared on the Go blog in early 2027.

Interactive refactoring in gopls

AI 摘要The Go team introduces interactive refactoring in gopls, powered by a newly proposed Language Server Protocol (LSP) capability that lets language servers ask users for input via dynamic, multi-step dialogs directly in their editors. This unlocks long-awaited refactorings such as adding or removing struct tags with custom conventions, implementing interfaces with dynamic symbol search, and moving declarations across files and packages. The feature was designed in collaboration with the Dart team as an open standard for all languages and editors, and is available in gopls v0.24.0 and the official VS Code Go extension v0.56.0.