On Saturday, March 4, 2017 at 12:56:23 AM UTC+8, James Bardin wrote: > > > > On Friday, March 3, 2017 at 11:47:10 AM UTC-5, T L wrote: >> >> >> Yes, the suggestion needs more allocations in creating new string and >> slice values. >> But it makes copying string and slice values a little faster and a little >> less memory consuming. >> >> > In most cases there is no difference between 1 word and 3 words, and is > usually faster than an extra pointer dereference. > > If you have a special case where the 3 words are costing you more than an > extra pointer dereference, you can always use a pointer to a slice. >
good point. -- 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. For more options, visit https://groups.google.com/d/optout.