I\'m interested in examining the x86 assembly output of the standard Go compiler to see if my code is really being converted into reasonably efficient assembly code; hopeful
You can redirect the output to a file like this:
go tool compile -S file.go > file.s
You can disable the optimization with -N:
go tool compile -S -N file.go
Alternatively, you can use gccgo:
gccgo -S -O0 -masm=intel test.go
which will generate test.s. You can play with the -O0/1/2/3 to see the different optimizations.