You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an important property to me since it allows to solve problems as the one described in https://discourse.julialang.org/t/is-dict-shrinking-feature-planned/68681. Can it be documented as an advantage of Dictionary over Dict? Or can it even be roughly explained what is the heuristic used to do the automatic shrinkage in the docs?
E.g.
julia>using Dictionaries
julia> d =Dictionary(x => x for x in1:10^6);
julia> Base.summarysize(d)
48777424
julia>for x in1:10^6delete!(d, x) end
julia> Base.summarysize(d)
272
julia> d =Dict(x => x for x in1:10^6);
julia> Base.summarysize(d)
35651768
julia>for x in1:10^6delete!(d, x) end
julia> Base.summarysize(d)
35651768
The text was updated successfully, but these errors were encountered:
Yes, I did implement it this way but the reason I didn't advertise this is I wasn't 100% sure whether the underlying Vector actually relinquishes its memory when shrunk. (I have a vague recollection of this being mentioned a long, long time ago and don't know the current story). Does anyone know?
This is an important property to me since it allows to solve problems as the one described in https://discourse.julialang.org/t/is-dict-shrinking-feature-planned/68681. Can it be documented as an advantage of
Dictionary
overDict
? Or can it even be roughly explained what is the heuristic used to do the automatic shrinkage in the docs?E.g.
The text was updated successfully, but these errors were encountered: