CasperLabs / datasize-rs

Heap memory usage estimation
Other
16 stars 13 forks source link

Improve heap estimation for HashMap and HashSet #8

Closed Guiguiprim closed 1 year ago

Guiguiprim commented 1 year ago

From reading the code, I think I spotted a small mistake in the computation of the estimated heap size for HashMap and HashSet.

Maybe I'm mistaken, in which case maybe a comment on why the behavior is different from Vec could be nice.

marc-casperlabs commented 1 year ago

I think this conflicts with #10 and has been implicitly fixed there (although I asked for a short explanation :)).

I'd love to keep the tests though, provided they are still applicable afterwards. Let's wait on how #10 shakes out, then update this one and potentially merge it after?

marc-casperlabs commented 1 year ago

@Guiguiprim I've merged #10, let me know what you think :)

marc-casperlabs commented 1 year ago

Closing this for now. Feel free to reopen if necessary!