Maps don't always escape now, for example: https://go-review.googlesource.com/#/c/3508/
Code was added to recognize that some ops don't cause escaping: https://go-review.googlesource.com/#/c/3031/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/3162/
dvyukov wrote about some potential improvements and linked to issues in Feb: https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpT...
I think I saw even string bytes can be stack-allocated sometimes now, but couldn't immediately find the CL.
It looks like this is one of those things where one just has to chip away at cases. Movement happening; just a ton of round tuits required.
Maps don't always escape now, for example: https://go-review.googlesource.com/#/c/3508/
Code was added to recognize that some ops don't cause escaping: https://go-review.googlesource.com/#/c/3031/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/3162/
dvyukov wrote about some potential improvements and linked to issues in Feb: https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpT...
I think I saw even string bytes can be stack-allocated sometimes now, but couldn't immediately find the CL.
It looks like this is one of those things where one just has to chip away at cases. Movement happening; just a ton of round tuits required.