|
|
@ -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.
|
|
|
|
Largely there are the same performance penalties as the above table, with very minor differences.
|
|
|
|
|
|
|
|
|
|
|
|
| Benchmark | Tests | Result |
|
|
|
|
| Benchmark | Tests | Result |
|
|
|
|
|--------------------|-----------------------------------------------|-----------------|
|
|
|
|
|--------------------|------------------------------------------------|-----------------|
|
|
|
|
| owning_strings | Inserts `String` into `HashSet` by cloning | ~3,096 ns/iter |
|
|
|
|
| owning_strings | Inserts `String` into `SmallMap` by cloning | ~3,096 ns/iter |
|
|
|
|
| non_owning_strings | Inserts `str` into `HashRefSet` by reference | ~47,302 ns/iter |
|
|
|
|
| non_owning_strings | Inserts `str` into `SmallRefMap` by reference | ~47,302 ns/iter |
|
|
|
|
| owning_ints | Inserts `u32` into `HashSet` by copy | ~316 ns/iter |
|
|
|
|
| owning_ints | Inserts `u32` into `SmallMap` by copy | ~316 ns/iter |
|
|
|
|
| non_owning_ints | Inserts `&u32` into `HashRefSet` by reference | ~30,046 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.
|
|
|
|
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.
|
|
|
|
This may not be very desireable, but is still an available feature.
|
|
|
|