Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the intricacies of dynamic memory allocation in Go and its impact on performance in this 37-minute conference talk from GopherCon 2018. Dive deep into the Go runtime's implementation of malloc(), examining internal optimizations to understand when allocation is fast or slow. Learn to leverage Go's CPU profiler, heap profiler, and execution tracer to identify when reducing allocations can boost program speed. Discover strategies for amortizing or reducing heap allocation, including slab allocation, string interning, buffer recycling, and sync.Pool from the Go standard library. Gain insights into real-world scenarios where these techniques have proven beneficial, along with potential implementation challenges and pitfalls to avoid.