Hacker News new | ask | show | jobs
by __HYde 2588 days ago
You could try compiling with and without `-gcflags '-N -l'`

`-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.