Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: Don't copy when converting non-escaping byte to string on return #27713
What version of Go are you using (
Edge cases that came to my mind that might need to be considered when deciding if the optimization is applied:
As a first iteration it may therefore be safer and easier to implement to only apply this to functions with no defers and no function calls in the return statement.