Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jincheng9 committed Feb 25, 2023
1 parent 58d44cf commit 0d52e05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
* [第15篇:interface使用的常见错误和最佳实践](./workspace/senior/p28/15-go-interface-pollution.md)
* [第16篇:any的常见错误和最佳实践](./workspace/senior/p28/16-any-keyword.md)
* 高性能Go
* [Profile-guided Optimization使用讲解](./workspace/senior/p35)
* [一文读懂Go 1.21引入的PGO性能优化](./workspace/senior/p35)
* [high performance go workshop](https://dave.cheney.net/high-performance-go-workshop/dotgo-paris.html)

* Go安全
Expand Down
14 changes: 11 additions & 3 deletions workspace/senior/p35/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# 一文读懂Go 1.21的PGO性能优化
# 一文读懂Go 1.21引入的PGO性能优化

## 背景

Go 1.21版本于2023年2月份正式发布,在这个版本里引入了PGO性能优化机制。

PGO的英文全称是Profile Guided Optimization,基本原理分为以下2个步骤:

* 先对程序做profile,得到一个.pgo文件
* 编译程序时启用pgo,编译器会根据.pgo文件里的内容对程序做性能优化

## 实例



Expand Down Expand Up @@ -36,5 +45,4 @@

## References

* https://twitter.com/go100and1
* https://twitter.com/go100and1/status/1623546829773361152
* https://go.dev/blog/pgo-preview

0 comments on commit 0d52e05

Please sign in to comment.