Hi,
So, in https://bugzilla.mozilla.org/show_bug.cgi?id=1747037, I'm investigating a memory usage regression that happened when removing our old fork of the stdlib hashmap (which we needed for various reasons, mostly fallible allocations) in favor of the new stdlib hashmap.
During the investigation, I found the underlying cause is just the growth factor choices. If I'm reading the code correctly, to allocate a enough capacity for a new capacity:
I understand there are various trade-offs involved and this might just be by design, but it's not obvious to me from reading the code this is the intended behavior, so filing just in case.
Hi,
So, in https://bugzilla.mozilla.org/show_bug.cgi?id=1747037, I'm investigating a memory usage regression that happened when removing our old fork of the stdlib hashmap (which we needed for various reasons, mostly fallible allocations) in favor of the new stdlib hashmap.
During the investigation, I found the underlying cause is just the growth factor choices. If I'm reading the code correctly, to allocate a enough capacity for a new capacity:
I understand there are various trade-offs involved and this might just be by design, but it's not obvious to me from reading the code this is the intended behavior, so filing just in case.