On Monday, November 16, 2015 at 11:24:20 AM UTC-5, Tomas Lycken wrote: > > Making sure that precompilation and gc don’t factor into the result, I get > quite different timings: > > julia> gc(); @time sizehint!(a, 10_000_000); > 0.001493 seconds (46 allocations: 76.296 MB, 304.61% gc time) > > julia> gc(); @time b = zeros(Int, 10_000_000); > 0.021997 seconds (38 allocations: 76.296 MB, 0.70% gc time) > > Compare to Array(Int, 10_000_000), which allocates an uninitialized array.
> >>> >> >
