go-perfbook README

The project's README from github.com/dgryski/go-perfbook. As one markdown file: README.md.

go-perfbook

Buy Me A Coffee

This document outlines best practices for writing high-performance Go code.

The first sections cover writing optimized code in any language. The later sections cover Go-specific techniques.

Multiple Language Versions

Table of Contents

  1. Writing and Optimizing Go code
  2. How to Optimize
    1. Optimization Workflow
    2. Concrete Optimization Tips
  3. Data Changes
  4. Algorithmic Changes
  5. Benchmark Inputs
  6. Program Tuning
  7. Optimization Workflow Summary
  8. Garbage Collection
  9. Runtime and Compiler
  10. Unsafe
  11. Common gotchas with the standard library
  12. Alternate Implementations
  13. CGO
  14. Advanced Techniques
  15. Assembly
  16. Optimizing an Entire Service
  17. Tooling
    1. Profiling
    2. Tracer
  18. Appendix
    1. Implementing Research Papers

Contributing

This is a work-in-progress book in Go performance.

There are different ways to contribute:

  1. add to or summarizes the resources in TODO
  2. add bullet points or new topics to be covered
  3. write prose and flesh out the sections in the book

Eventually sample programs to optimize and exercises will be needed (maybe).

Coordination will be done in the #performance channel on the Gophers slack.

go-perfbook (dgryski/go-perfbook)

Searching Database…

What is this?It is a free, work-in-progress book documenting best practices for writing high-performance Go code, covering both general optimization techniques and Go-specific ones.
Is this a book or a code library?It is a book-style reference document, not a library or tool you install into a project. It's organized as a table of contents of chapters you read.
How do I start reading it?Start with the 'Writing and Optimizing Go code' section, which covers how to optimize, the optimization workflow, and concrete tips before moving into Go-specific sections like garbage collection, runtime/compiler, and profiling.
Do I need to know Go already?Yes, the Go-specific sections (garbage collection, runtime, CGO, assembly) assume you already know Go; the earlier general sections apply to any language.
Is the book finished?No, it's explicitly a work in progress — some sections are just bullet points or TODOs waiting to be fleshed out into prose, and exercises/sample programs don't exist yet.
Is it available in languages other than English?Yes, there are translated versions in Chinese, Spanish, and Brazilian Portuguese alongside the English original.
Does the book cover profiling tools?Yes, there's a dedicated Tooling section covering Profiling and the Tracer, plus an appendix on implementing research papers.
Creator
dgryski
Size
0.4 MB
Stars
10.9K
Updated
CommitJan 05
Age
10y
Commits · 90 Days