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: byte conversion to string causes unnecessary alloc #31506
What version of Go are you using (
In these cases, we could use slicebytetostringtmp and avoid the allocation. However, detecting when that's safe is rather tricky.
In particular, we have to make sure that as long as the converted
That's true, but we don't currently have any way to track internal code that might mutate the byte while the string value is valid.
Even knowing that