Last updated at 2022/05/12
Initially created at 2022/03/20

Go Programming Language

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.

Typed Nil