Skip to content
Opensource internals
  • Posts

Go

Go Preempts Goroutines with a Signal: Asynchronous Preemption Since Go 1.14

Oct 21, 2026 16 min read Jay Hubbert

Go preempts goroutines cooperatively by poisoning the stack bound and asynchronously with SIGURG; the signal handler checks PCDATA_UnsafePoint before injecting a call to …

GoInternalsPreemptionSignalsConcurrency

Read more →

Go Removes Interface Calls With PGO: Devirtualization and Inlining Hot Call Sites

Oct 21, 2026 25 min read Jay Hubbert

A PGO profile tells the Go compiler which concrete type dominates each interface call site; the compiler then rewrites the call as a type-assert plus direct call, falling back to …

GoInternalsPgoDevirtualizationInterfaces

Read more →

Go's Atomics and the Memory Model: What sync/atomic Actually Guarantees

Oct 21, 2026 18 min read Jay Hubbert

sync/atomic is sequentially consistent, the typed wrappers (Int64, Pointer[T]) exist to stop you shooting yourself in the foot, and on amd64 everything bottoms out in LOCK CMPXCHG …

GoInternalsAtomicsMemory modelConcurrency

Read more →

Go's Build Cache: Content Hashes, Action IDs and Why Rebuilds Are Instant

Oct 21, 2026 13 min read Jay Hubbert

Go’s build cache keys each action on a hash of its inputs and stores the output under a hash of its contents, so a rebuild that changes nothing runs no compiler at all.

GoInternalsBuildToolchainPerformance

Read more →

Go's defer and panic: Open-Coded Defers and the Runtime's Unwind Loop

Oct 21, 2026 20 min read Jay Hubbert

Go compiles a defer three different ways depending on where it appears, and the panic runtime unwinds those three shapes separately.

GoInternalsDeferPanicRuntime

Read more →

← Newer Page 2 of 12 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·