|
|
|
@ -59,12 +59,12 @@ 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 |
|
|
|
|
|
| Benchmark | Tests | Result |
|
|
|
|
|
|--------------------|------------------------------------------------|-----------------|
|
|
|
|
|
| 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.
|
|
|
|
|