On Friday, December 19, 2014 12:10:31 PM UTC-8, Jim Garrison wrote: > > > > On Friday, December 19, 2014 10:12:42 AM UTC-8, Tim Holy wrote: >> >> Julia's arrays grow by doubling, see >> http://en.wikipedia.org/wiki/Dynamic_array >> > > Is it strictly true that arrays in Julia grow by a factor of two on each > reallocation? It has been argued (see e.g. > https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md#memory-handling) > > that a growth factor of two is actually the worst possible one for > performance (though it is of course better than non-exponential growth). > I'm left wondering whether details of Julia's allocator may mean that the > linked considerations do not apply here... >
There's a ticket for this: https://github.com/JuliaLang/julia/issues/8269 Here's how I found it: https://github.com/JuliaLang/julia/search?q=grow+arrays&type=Issues&utf8=%E2%9C%93 but I had a vague recollection that it existed before I went searching.