Explore the intricacies of dead code elimination in Go during this 42-minute conference talk from GoLab. Dive deep into how the Go linker removes unused functions and learn about the more relaxed version of deadcode elimination triggered by specific reflection methods. Discover how to identify if the degraded version is being used through the `-dumpdep` flag output. Gain practical insights on avoiding problematic reflection methods without sacrificing functionality or backwards compatibility, illustrated through real-world examples from popular projects like Delve, Cobra, and Starlark. Enhance your understanding of Go's compilation process and optimize your code for better performance and smaller executables.
Overview
Syllabus
Getting the most out of dead code elimination - Alessandro Arzilli
Taught by
GoLab conference