Skip to content
Opensource internals
  • Posts

Slices

Go's Slices Are Pointers With a Trick: Capacity, Aliasing and the Growth Algorithm

Oct 21, 2026 18 min read Jay Hubbert

A Go slice is a pointer, a length and a capacity over a shared backing array: append doubles under 256 elements and grows 1.25x above it, and every growth memmoves the old contents …

GoInternalsSlicesMemoryPerformance

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·