Re:Go: A Surprising Edge Case Concerning Append and Slice Al...
by waps on Tuesday May 19, 2015 @04:12AM
(#9568655)
Really ? I thought it was limited to something like a fixed number of megabytes increase per call.
[ Parent
| on HN ]
Re:Go: A Surprising Edge Case Concerning Append and Slice Al...
by SamReidHughes on Tuesday May 19, 2015 @05:29PM
(#9573281)
Appending to a slice I get these capacities:
cap: 1
cap: 2
cap: 4
...
cap: 512
cap: 1024
cap: 1312
cap: 1696
cap: 2208
cap: 3072
cap: 4096
cap: 5120
cap: 7168
...
cap: 192797696
cap: 240997376
So it looks like it starts by doubling, then it gets weird between 1024 and 4096, and then it multiplies by 1.25.