Daily Edition · Page 4

THE DAILY INDEX

Technology, AI, software, security, crypto and business

ARTICLES & TUTORIALS

TLDR Web Dev

WHAT'S //GO:NOSPLIT FOR?

Go's `//go:nosplit` directive removes the usual stack overflow check from functions to improve performance. Nosplit functions skip the preemption check that normally compares the stack pointer against a limit and calls `runtime.morestack` when needed, making them about 2% faster in hot loops but potentially much faster when the goroutine struct isn't cached. However, nosplit functions are dangerous because they can cause stack overflows, so the Go linker includes safety checks to make sure chains of nosplit functions don't exceed a small stack limit (792 bytes).

TLDR IndexPage 4