The post discusses a 30% performance regression in a Golang codebase due to a commit that was supposed to be a no-op refactor. It highlights the importance of understanding memory allocations in Golang, particularly the difference between stack and heap allocations. The change of using a pointer receiver instead of a value receiver to prevent unnecessary copies led to performance optimization. The post also explains escape analysis and how tools like `go build -gcflags "-m"` can help in identifying allocation issues.
Table of contents
Value Receivers vs Pointer ReceiversStack Allocation vs Heap AllocationThe Takeaway1 Comment
Sort: