3 ms·
go build -gcflags -m After some quick googling I can't find what the "m" flag does. Can anyone shed some light?
by nemothekid 13y ago
go build -gcflags -m
After some quick googling I can't find what the "m" flag does. Can anyone shed some light?
- kid0m4n 13y agoAuthor of the article here It helps in finding out details of what the compiler (Xg) thinks of various funcs inlining applicability (is that even a word?)
- gillianseed 13y agoSpeaking of gcflags, did you try Go with gcflags=-B to see how it performs without bounds checking. I know this isn't 'the right way' given that Go is supposed to be a safe language but it would be interesting to see how much difference it would make.
- kid0m4n 13y agoHave not tried that... will give it a shot But I guess we are then going away from idiomatic Go
- gillianseed 13y agoI guess, it's an unsupported compiler option (as in it can disappear any new release). I looked at it more as an option for when you want to cram out possible extra performance of release builds.
- nickpresta 13y agogo build -gcflags If you run `go help build`, you will see: -gcflags 'arg list' arguments to pass on each 5g, 6g, or 8g compiler invocation. Then you can run: go tool 6g And see: -m print optimization decisions