Need help with go-perfbook?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

dgryski
9.2K Stars 506 Forks 403 Commits 8 Opened issues

Description

Thoughts on Go performance optimization

Services available

!
?

Need anything else?

Contributors list

# 13,591
Go
perform...
Arduino
golang
306 commits
# 75,733
Shell
Elixir
PureScr...
deoplet...
9 commits
# 41,485
perform...
Go
Arduino
mining-...
7 commits
# 181,833
perform...
4 commits
# 181,231
perform...
4 commits
# 202,755
perform...
3 commits
# 164,372
perform...
golang
Shell
TeX
3 commits
# 17,882
Redis
excel
ooxml
golang
2 commits
# 33,871
Groovy
Docker
lambda
perform...
2 commits
# 155,991
Go
perform...
Vim
golang
2 commits
# 137,508
Go
perform...
1 commit
# 64,702
datadog
gRPC
mjpeg
face-tr...
1 commit
# 10,858
Markdow...
ecmascr...
openlay...
spatial...
1 commit
# 172,879
CSS
Shell
game-li...
golang
1 commit
# 93,357
Go
Linux
sensu
nagios
1 commit
# 7,595
Shell
Ruby
Git
Rails
1 commit
# 62,432
PHP
hashico...
Algolia
Laravel
1 commit
# 81,190
golang
aws-s3
SQL
Apache ...
1 commit
# 248,475
C
Shell
perform...
golang
1 commit
# 5,570
Common ...
kali-li...
nextjs
gitlab-...
1 commit

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.