On Sun, Nov 17, 2019 at 1:00 AM Kevin Malachowski <niftasti...@gmail.com> wrote:
> "make"ing a byre slice every time you call Equal is not likely as > efficient; surely it will put pressure on the garbage collector, assuming > it's not just called a few times. > AFAICT the compiler correctly deduces that the slice doesn't escape and puts it on the stack. So, no, it doesn't :) > > Writing something in less lines is not strictly better. I'd probably just > make package level variable and reuse it among multiple calls to that > function. > > -- > 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/9cfa25b8-4a18-47ca-9f37-5d5ae5b71849%40googlegroups.com > . > -- 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/CAEkBMfGdoOYiNp2qoiSEDHvBc6ZZrs0dQ2QqJoEkom_2CrUGYw%40mail.gmail.com.