You might be right, but I just don't realize how. Since capacity will be 2x or 1.5x as before, reallocating the slice will not happen often. Or do you think that this would still be worse than copying almost all slice everytime there is a pop ?
On Tuesday, September 20, 2016 at 5:59:27 PM UTC+3, Ian Davis wrote: > > On Tue, Sep 20, 2016, at 03:54 PM, Gabriel Adumitrachioaiei wrote: > > Well, the capacity will be reduced by one. I don't think this makes much > difference. > > > It makes a difference for a long running service that repeatedly pushes > and pops. > > Ian > > -- 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.