Can we reuse Dictionary allocation?

I think you could just empty! it at the end of each loop iteration. My understanding is that it won’t shrink the internal vectors. In fact, there’s no way to shrink the internal vectors until julia 1.9, when sizehint! will be able to shrink them, thanks to https://github.com/JuliaLang/julia/pull/45004.

4 Likes