On the local machine i am executing
go tool compile -S main.go > main.s
in the second case, I see that the compiler sees here a local variable entering the code. Why is this happening ? why is such a different code generated?
Keith Randall
unread,
Jul 13, 2021, 7:27:55 PM7/13/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
The Go compiler is not very good at eliminating redundant copies of large temporaries (structs with many fields, or arrays with length>1).