git blame is instructive here. The commit in question is: https://github.com/golang/go/commit/166b1219b8a5b246c83986c7ecef3d15c85c8150
I can't claim to fully understand the commit message, but I believe that this change will cause the runtime to allocate both values together, rather than separately, and this slightly reduces GC pressure. On Monday, February 8, 2021 at 10:37:29 PM UTC-5 messi...@gmail.com wrote: > Hi, > > I'm reading the go compiler source code and found the following code style > in several places: > > [image: DeepinScreenshot_select-area_20210209105635.png] > > Is there some special reasons to group n,m,p to a local struct? > > Why don't we just init n the following way: > > [image: DeepinScreenshot_select-area_20210209110823.png] > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/b8b49edc-ac6d-40e2-98b6-07b9c5dd2bfen%40googlegroups.com.