What would you pick? You need to pick something. It was just arbitrary, I'm sure. 1024 is a nice number, and it's larger than the length of many slices.
Sometimes a number is just a number. -rob On Sun, Sep 5, 2021 at 3:14 AM Miraddo <mposhtd...@gmail.com> wrote: > Hey Guys, > > We know slices grow by doubling until size 1024, the capacity will grow at > 25%. The question that I had was why after 1024 elements? Why didn't the > developers chose another number like 2048 or other numbers? > > Thanks, > Milad > > -- > 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/21a5a2b5-2eaf-45d6-a538-5a882fafd0a6n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/21a5a2b5-2eaf-45d6-a538-5a882fafd0a6n%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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOXNBZQZRKOrxPKve5eNsQGS3X-fyBGmNFy8aqe4HcVL3nUeMQ%40mail.gmail.com.