The Go compiler contains lots of optimizations, especially considering its age.
is maybe a good starting point.
`-N` disables optimization and `-l` disables in-lining.
I also found this[0] page which lists some optimizations done by the compiler.
[0] https://github.com/golang/go/wiki/CompilerOptimizations
edit: You can see what the compiler emits as assembly code with `-gcflags '-S'` so you can compare the optimized vs unoptimized assembly.