On Sunday, September 5, 2021 at 12:52:06 AM UTC-4 Kurtis Rader wrote:
> On Sat, Sep 4, 2021 at 9:38 PM tapi...@gmail.com <tapi...@gmail.com> > wrote: > >> Why? That is an undocumented implementation detail. Furthermore, the >>> length of "x1" and "x2" at the time when they are appended to, in >>> combination with the value being appended, are reasonable predictors of the >>> capacity of the new slice. It is up to you to prove that a different >>> heuristic performs better. >>> >> >> Are there some evidences to prove the current algorithm is better? >> > > It is your responsibility to show that a different heuristic (not > "algorithm"). is better. > I have shown some examples above, which outputs will be more in line with exception if the heuristic will only depends on the sum length of the two arguments. Clarification: I don't think the exponential growth algorithm is bad. I just think it should make the capacities increase monotonically. > > -- > Kurtis Rader > Caretaker of the exceptional canines Junior and Hank > -- 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/8892db72-1392-4ee3-b336-5c64c6ef7f1cn%40googlegroups.com.