Goroutines' 2KB Stack vs. OS Threads' 1MB+

Goroutines are exceptionally lightweight, starting with just 2KB of memory and creating in approximately 300 nanoseconds. This is significantly less than traditional OS threads, which typically require 1MB or more for their stacks and are much slower to create and context switch.

Sources

Open the full topic