Show HN: Go Plan9 Memo

Go Assembly vs. Plan 9 Naming

  • Many commenters note the article incorrectly calls Go’s assembly language “Plan9.”
  • Consensus: Plan 9 is an operating system; Go uses “Go assembly” with a Plan 9–style syntax.
  • Official Go docs describe it as Go’s assembler, “based on the input style of the Plan 9 assemblers,” but do not name it Plan9.
  • Several people found the article’s title and repeated use of “Plan9” confusing or misleading.

Go, Plan 9, and Historical Lineage

  • Strong historical links: Go’s implementation and tools were originally based on Plan 9 compiler infrastructure.
  • Shared ideas include CSP-style concurrency and terminology like “dial” for network connections.
  • Earlier languages and systems from the same lineage (Alef, Newsqueak, Limbo/Inferno) are mentioned as conceptual predecessors.

SIMD in Go: Why Not in the Standard Library?

  • Some argue Go’s standard library prioritizes portability and simplicity over peak performance and special-case intrinsics.
  • A rejected proposal for SIMD intrinsics is cited; rationale: Go should avoid complex, performance-only language features.
  • Go does use SIMD in limited cases (e.g., copies), but lacks general auto-vectorization compared to languages like C/C++ or JVM/.NET.
  • cgo is considered too heavyweight for fine-grained SIMD; direct assembly is preferred for low-overhead hot paths.

Writing Go Assembly: Mechanics and Tools

  • Comments clarify details: parameter sizes, stack frames, NOSPLIT behavior, and that Go’s external calling convention is register-based while assembly-written functions use a stack-based convention.
  • Newer “go:build” tags and filename suffixes make some of the article’s build-tag usage outdated or redundant.
  • Libraries like Avo are recommended to generate Go assembly with safer abstractions; PeachPy is also mentioned.

Cross-Compilation and Architecture Support

  • Go’s cross-compilation is widely praised as a major strength: changing GOOS/GOARCH is usually enough.
  • People describe using Go to target multiple architectures (x86, ARM, MIPS, RISC-V, etc.) and even running tests under QEMU with minimal friction.
  • Some question whether the unified assembly syntax truly matters for cross-compilation, suggesting its main benefit is simpler assembler implementation.

SIMD vs GPU

  • One commenter suggests GPUs might be better for heavy parallelism.
  • Others counter that in typical server/cloud contexts, CPUs with SIMD are more practical than requiring GPU-equipped infrastructure; SIMD can yield substantial speedups without changing deployment assumptions.