go-perfbook is an open, work-in-progress book about writing and optimizing high-performance Go software. It begins with optimization principles that apply across programming languages before moving into Go-specific techniques. The material covers measurement workflows, data and algorithm changes, benchmarking, program tuning, garbage collection, compiler behavior, and standard-library pitfalls. Later chapters examine unsafe operations, cgo, assembly, advanced techniques, service-wide optimization, profiling, and tracing. The project emphasizes measuring real bottlenecks before changing code rather than relying on intuition. Community contributors can expand topics, add resources, and develop additional prose or examples. The book is available in English, Chinese, Spanish, and Brazilian Portuguese.
Features
- Performance optimization workflows
- Benchmarking and program tuning guidance
- Garbage collection and compiler analysis
- Go standard-library performance pitfalls
- Profiling, tracing, cgo, and assembly topics
- English, Chinese, Spanish, and Portuguese editions