Hi all, I have a few question regarding Go compiler optimizations.
How Go Compiler (gc) optimize methods with value or pointer receiver (or functions)?
Does a method with value receiver always create a copy of data to its stack or the copy happend if there's a write attempt to it (CoW, or used fields)?
From what I know it always create a copy of data with DUFFCOPY, but I am not sure if there's another cases.
For example I have 2 methods. Value, pointer receiver, respectively:
TEXT main.Donothing(SB), NOSPLIT|ABIInternal, $0-216
TEXT main.PtrDonothing(SB), NOSPLIT|ABIInternal, $0-8
Function `main.Donothing` has a big stack size compared `main.PtrDonothing`
And how does that affect inline budget
Thank you.