I'm not familiar with the compile code, but I guess it should be helpful. It looks boxing bytes are handled at compile time but boxing small integers are handled at run time.
Thanks for the info. On Monday, May 10, 2021 at 11:40:07 AM UTC-4 [email protected] wrote: > Does this help? > > > https://github.com/golang/go/blob/25aff96f4b49842a44253b72472062a6d775231c/src/cmd/compile/internal/gc/walk.go#L841 > > On Mon, May 10, 2021 at 4:46 PM [email protected] <[email protected]> > wrote: > >> Yes, I'm aware of this optimization. >> But it looks another optimization is applied for boxing bytes. >> >> On Monday, May 10, 2021 at 10:38:39 AM UTC-4 Jan Mercl wrote: >> >>> On Mon, May 10, 2021 at 4:30 PM [email protected] <[email protected]> >>> wrote: >>> >>> >>> https://github.com/golang/go/commit/9828c43288a53d3df75b1f73edad0d037a91dff8 >>> >>> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/1b5feb93-a1b9-4bd7-871a-d4851c15f031n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/golang-nuts/1b5feb93-a1b9-4bd7-871a-d4851c15f031n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/68b72d41-2a20-4c1a-8ae9-5c5c6ea0c3f2n%40googlegroups.com.
