Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/gc: specify that C or assembly function arguments do not escape #4099
It would be nice if there were a way to tell gc that an external function (written in C or assembly) does not let its arguments escape. Right now sometimes it is faster to execute Go than assembly because the Go code has better escape analysis while gc assumes the worst about assembly.
@rsc. Daniel Morsing and I played with this a few months back in the context of avoiding arguments passed to arm functions not escape. Specifically syscall.Syscall*'s where the byte passed to syscall.Read() and friends was made to not escape. Disappointingly we couldn't detect any significant improvement in the go1 benchmarks. @dmorsing - do you still have that CL ?