You can find out the answers yourself by looking at the number of allocations 
reported by @time. From that, you'll discover that julia doubles the size of 
the storage whenever it reallocates (so it uses ~log2(N) allocations).

--Tim

On Wednesday, March 02, 2016 09:39:52 AM Lutfullah Tomak wrote:
> Hi Ryan,
> I believe you need to look at sizehint if you need to use push! or append! a
> lot
> 
> Here a thread for it 
> https://groups.google.com/forum/m/#!topic/julia-users/214uuJcCF6o and julia
> doc
> and reference
> http://docs.julialang.org/en/release-0.4/stdlib/collections/#Base.sizehint!
> 
> Best,

Reply via email to