2 ms·
So, watching https://twitter.com/golang_cls https://twitter.com/golang_cls, some escape-analysis and general garbage-prevention stuff landed (much from, or with
by twotwotwo 11y ago
So, watching https://twitter.com/golang_cls https://twitter.com/golang_cls, some escape-analysis and general garbage-prevention stuff landed (much from, or with the involvement of, the always-amazing Dmitry Vyukov).
Maps don't always escape now, for example: https://go-review.googlesource.com/#/c/3508/ 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/3031/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/8201/ https://go-review.googlesource.com/#/c/3162/ 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/1CxgUBPlx9iJzkz9JWkb6tIpTe5q32QDmz8l0BouG0Cw/edit# 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.