by kwertzzz · 4y ago · 0 comments
julia> k = Int32.(1:1000_0000); v = rand(Int32,1000_0000);
julia> dict = Dict(zip(k,v));
julia> Base.summarysize(dict) / (2 * 4 * 1000_0000)
1.8874391
julia> Base.summarysize(dict)
150995128Checking with a million values, on my Julia v1.8.0, the dict takes up 18 MB, or about 130% more than the plain values (or an array of Pairs) would.