added smallmap impl

master
Avril 4 years ago
parent be260647d7
commit 6e19585e48
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -60,11 +60,11 @@ Comparing with cloning or copying into `smallmap::Map`.
Largely there are the same performance penalties as the above table, with very minor differences.
| Benchmark | Tests | Result |
|--------------------|-----------------------------------------------|-----------------|
| owning_strings | Inserts `String` into `HashSet` by cloning | ~3,096 ns/iter |
| non_owning_strings | Inserts `str` into `HashRefSet` by reference | ~47,302 ns/iter |
| owning_ints | Inserts `u32` into `HashSet` by copy | ~316 ns/iter |
| non_owning_ints | Inserts `&u32` into `HashRefSet` by reference | ~30,046 ns/iter |
|--------------------|------------------------------------------------|-----------------|
| owning_strings | Inserts `String` into `SmallMap` by cloning | ~3,096 ns/iter |
| non_owning_strings | Inserts `str` into `SmallRefMap` by reference | ~47,302 ns/iter |
| owning_ints | Inserts `u32` into `SmallMap` by copy | ~316 ns/iter |
| non_owning_ints | Inserts `&u32` into `SmallRefMap` by reference | ~30,046 ns/iter |
Each page of the `SmallRefMap` will consume at least 16kb of memory however.
This may not be very desireable, but is still an available feature.

Loading…
Cancel
Save