If your application works in Kubernetes, automatically set to match the Linux container CPU quota. The number of threads that the Go scheduler uses will be as much as the CPU limit you defined in k8s yaml. You can automatically sort your structs with tools such as fieldalignment.
Table of contents
1- If your application works in Kubernetes, automatically set GOMAXPROCS to match the Linux container CPU quota.2- Sort struct fields3- Garbage Collection tune4- Use unsafe package to string <-> byte conversion without copying5- Use jsoniter instead of encoding/json6- Use sync.Pool to reduce heap allocations2 Comments
Sort: