#hash-map #step #wrapper #fit #rehashing #shrinks

rehashinghashmap

A HashMap wrapper that shrinks to fit in small steps

3 releases

Uses old Rust 2015

0.1.2 Jul 6, 2015
0.1.1 Jun 29, 2015
0.1.0 Jun 21, 2015

#23 in #fit

BSD-2-Clause

22KB
663 lines

Rehashing Hash Map

Build Status

A HashMap wrapper that shrinks to fit in small steps.

Why?

Some applications need a high availability and HashMap.shrink_to_fit is an expensive operation.

How?

Taking a hit in memory. A RehashingHashMap has two HashMap structs and when shrinking it moves the element from one to the other on every write operation taken.

When?

In situations where you want to claim the memory back after removing elements from a set, but you cannot take a big downtime.

No runtime deps