Open Tortar opened 10 months ago
Also, I'm not sure if this is intended but for a Dictionary
it says it is not defined:
julia> d = Dictionary(x => x for x in 1:10^4);
julia> sizehint!(d, 10)
ERROR: MethodError: no method matching sizehint!(::Dictionary{Int64, Pair{Int64, Int64}}, ::Int64)
Closest candidates are:
sizehint!(::Base.IdSet, ::Any)
@ Base idset.jl:26
sizehint!(::IdDict, ::Any)
@ Base iddict.jl:76
sizehint!(::Set, ::Any)
@ Base set.jl:120
...
Stacktrace:
[1] top-level scope
@ REPL[5]:1
Is this due to the auto-shrinking behaviour of Dictionary
(it seems to me that indeed UnorderedDictionary
doesn't have such a feature)?
I see that the method is implemented here: https://github.com/andyferris/Dictionaries.jl/blob/master/src/UnorderedDictionary.jl#L162
but it seems not to work: