The //go:nosplit directive in Go prevents functions from performing stack overflow checks, making them faster but potentially dangerous. While nosplit functions avoid the ~2% performance overhead of stack growth checks and prevent preemption, they can cause linker errors, segfaults, and runtime livelocks if misused. The
Sort: