Go Inline Assembler: Dream or Reality
summary
Proposal implements one intrinsic function in the unsafe package that accepts an opcode name and Go values as operands, with a working prototype that emits assembly and in many cases matches hand-written asm performance (occasionally a bit slower for exotic control-flow tricks). Tooling (formatting, docs, linters) works because asm appears as Go, and functions become inlinable so there is no call overhead. Core reviewers close the proposal but experiments and third-party wrappers remain possible.
AI-written summary · about
chapters (14)
- 0:00Introduction and motivation
- 4:44Performance gains with assembly
- 10:03Challenges of writing assembly
- 16:09Proposal for inline assembler
- 20:49Future of Go inline assembly
- 21:11Communication with Go team
- 22:39Q&A on assembly instructions
- 23:48Go assembly runtime guarantees
- 24:52Portability in assembly code
- 26:21Safety concerns with inline assembly
- 28:31Using the prototype implementation
- 29:35Alternative inline assembly approaches
- 31:26Q&A on style and tooling
- 32:52Closing remarks and Q&A wrap-up
related talks
17mBetter x86 Assembly Generation with Go
53mReconciling the irreconcilable and accelerating the unacceleratable using Go assembler☠️
44mImplementing Software Machines in Go and C
37mAssembling
24mFunction Inlining
22mDynamic Go Instrumentation for Production Environments
35mInlining: bright victories and hidden defeats
29mExperimenting with Golang and Webassembly
