-
Notifications
You must be signed in to change notification settings - Fork 0
Show gc optimization decisions in your Go source
License
barnex/go-optview
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Go-optview takes the output of gc -m (compiler's optimization decissions) and presents it side-by-side with the source code. Use: go-optview [flags] [packages] Flags: -V: print version and exit -c: clean existing optimization messages from source -prefix: prefix for optimization messages, default "//←" -w: write result to source files instead of stdout Usage examples: Write optimization messages back to source files: go-optview -w (current directory) or: go-optview -w mypackage Clean source files: go-optview -w -c Write optimization messages to stdout: go-optview Example output: func MakeSlice(N int) Slice { //←[ can inline MakeSlice] return make(Slice, N) //←[ make(Slice, N) escapes to heap] } func (s Slice) N() int { //←[ can inline Slice.N Slice.N s does not escape] return len(s) }
About
Show gc optimization decisions in your Go source
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published