πŸ‡ΊπŸ‡¦ Go performance channel
1.5K subscribers
39 photos
400 links
Go performance, runtime, concurrency.

Talks, blogposts and open source projects for gophers.

Not affiliated with Go team.

https://go-perf.dev

(mail: [email protected] / @olegkovalov)
Download Telegram
See a new article by @GopherAcademy about #golang pointers and how to use them properly (also checkptr command)

Quick example for check pointer:
gotip run -gcflags=all=-d=checkptr main.go)

https://blog.gopheracademy.com/advent-2019/safe-use-of-unsafe-pointer/
An experiment in rewriting sync primitives via #golang channels. Not a thing for production use, but a good practice, thanks twitter.com/empijei

https://blogtitle.github.io/go-advanced-concurrency-patterns-part-3-channels/
User defined traces for go tool trace util and an example how to use it #golang

https://medium.com/@felipedutratine/user-defined-runtime-trace-3280db7fe209
An interesting optimisation in #golang math/rand package by twitter.com/cafxx. Devirtualizing (avoiding interface calls) often improves code performance, but don't overuse it, please (it makes sense for hot code path).

https://go-review.googlesource.com/c/go/+/191538/
Famous story from Uber: How Uber Halved Our Metrics Ingestion Latency by (Briefly) Forking the #golang Compiler

https://eng.uber.com/optimizing-m3/
Despite the fact that #golang finalizers are dangerous (if you're not paying attention) they really might improve performance of your application and give additional benefits.

See: Autopool Speeding Up gRPC With Finalizers
https://gophersre.com/2019/12/31/autopool/

Repo: https://github.com/johnsiilver/golib/tree/master/development/autopool/blend
Scheduling and GC article also have part 2,3, don't forget to read them too πŸ˜‰ #golang

RT:
Here are the top blog posts from 2019:

1. Iterating Over Slices In Go
https://www.ardanlabs.com/blog/2013/09/iterating-over-slices-in-go.html
2. Scheduling In Go: Part I - OS Scheduler
https://www.ardanlabs.com/blog/2018/08/scheduling-in-go-part1.html
3. Garbage Collection In Go: Part I - Semantics
https://www.ardanlabs.com/blog/2018/12/garbage-collection-in-go-part1-semantics.html
(I'm sorry for a little break, but...)

If you're going to work with UDP sockets in #golang be aware of this article (2018). Bunch of details, explanations and examples. Thank you twitter.com/cirowrc

https://ops.tips/blog/udp-client-and-server-in-go/#receiving-from-a-udp-connection-in-a-server
From today series of #golang proposals regarding changes in runtime, compiler and all this strange stuff will be posted here.

The first one in the series: Create an undefined internal calling convention (by Austin Clements) https://github.com/golang/proposal/blob/master/design/27539-internal-abi.md
#golang performance tooling tip:

go tool pprof -base=https://old.prof https://new.prof

See the difference (subtraction) between the profiles. Useful to spot what piece of code to blame for a performance regression.

Courtesy of Keith: https://golang.org/214818

Original: https://twitter.com/mvdan_/status/1217313825600364544
Escape from Escape Analysis of #golang Sounds pretty interesting!

For the code, the heap allocation -8.88%, the heap usage -8.78%. Time consumption -9.48%, cumulative time of GC pause -5.64%.

Paper https://www.wingtecher.com/themes/WingTecherResearch/assets/papers/ICSE20.pdf

Code https://github.com/wangcong15/escape-from-escape-analysis-of-golang
List of #Awesome #golang performance tools and libs.
https://github.com/cristaloleg/awesome-go-perf

Feel free to submit more!

(and sorry for a long break:)