News for hackers. Stuff that matters.
Re:Go 1.6 GC improvements by tedunangst on Thursday August 13, 2015 @10:45PM (#10058367)
I've wondered for a while how much go could benefit from better escape analysis. Especially if they don't do generational.

Intuitively, it seems quite some escapes are only returned to the caller, then lost. If the compiler rewrote those functions as operating on references to caller provided memory (on the stack), it could reduce transient garbage.

Re:Go 1.6 GC improvements by twotwotwo on Thursday August 13, 2015 @11:00PM (#10058403)
So, watching 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/

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.