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…

这是什么?这是一本免费、仍在编写中的书,记录编写高性能 Go 代码的最佳实践,既涵盖通用优化技巧,也涵盖 Go 特有的优化方法。
这是一本书,还是一个代码库?它是一本参考书式的文档,不是需要安装到项目里的库或工具。它以目录形式组织成一章章供你阅读的内容。
我该怎么开始阅读?先读“Writing and Optimizing Go code”部分,它讲解如何做优化、优化的工作流程和具体技巧,之后再进入 Go 特有的章节,如垃圾回收、runtime/compiler 和性能分析。
我需要先会 Go 吗?需要。Go 特有的章节(垃圾回收、runtime、CGO、汇编)假定你已掌握 Go;前面的通用章节则适用于任何语言。
这本书写完了吗?还没有。它明确仍在编写中——有些章节只有要点列表或 TODO,等待扩写成正文,练习和示例程序也尚不存在。
它有英文以外的语言版本吗?有。除英文原版外,还有中文、西班牙语和巴西葡萄牙语译本。
书中介绍性能分析工具吗?有。书中设有专门的 Tooling 章节,讲解 Profiling 和 Tracer,另有一个关于实现研究论文的附录。
Creator
dgryski
Size
0.4 MB
Stars
10.9K
Updated
CommitJan 05
Age
10y
Commits · 90 Days