DEV Community

Discussion on: A closer look at Go's append function

Collapse
 
init profile image
Alexander Bykov

This behavior changed in go 1.18 to more smooth allocation:
starting cap growth factor
256 2.0
512 1.63
1024 1.44
2048 1.35
4096 1.30

commit:
github.com/golang/go/commit/2dda92...