Go Programming Language
- Effective Go
- Functional options for friendly APIs
- Practical Go: Real world advice for writing maintainable Go programs
- Package names
- How to write benchmarks in Go
Concurrency
Pitfalls
Go may be slow
Why did you create a new language?;
Finally, working with Go is intended to be fast: it should take at most a few seconds to build a large executable on a single computer.
Why does Go perform badly on benchmark X?;
One of Go's design goals is to approach the performance of C for comparable programs, yet on some benchmarks it does quite poorly, including several in golang.org/x/exp/shootout.
... Still, there is room for improvement. The compilers are good but could be better, many libraries need major performance work, and the garbage collector isn't fast enough yet. (Even if it were, taking care not to generate unnecessary garbage can have a huge effect.)
The Go compiler needs to be smarter (2020) pointed out conservative inlining and the lack of runtime constant variables.
- LLVM-backed compilers (rustc, clang), GCC and JVM are optimized for decades.
- In addition to that, Go is okay to sacrifice its runtime perfomance to shorten the build time, which is different from other compilers.
- Go's FFI is also slow.
Typed Nil
- https://go.dev/doc/faq#nil_error
- https://dave.cheney.net/2017/08/09/typed-nils-in-go-2