update readme

master
Avril 4 years ago
parent 75e31beacc
commit 75f7a39b9f
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -1,11 +1,12 @@
[package] [package]
name = "refset" name = "refset"
description = "A non-owning HashSet" description = "A non-owning HashSet"
repository = "https://git.flanchan.moe/flanchan/refset"
keywords = ["hash", "set", "reference"] keywords = ["hash", "set", "reference"]
version = "0.1.0" version = "0.1.0"
authors = ["Avril <flanchan@cumallover.me>"] authors = ["Avril <flanchan@cumallover.me>"]
edition = "2018" edition = "2018"
license= "mit" license= "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

@ -42,7 +42,7 @@ Even when `Clone` is required to insert into `HashSet`, it can be ~10x faster fo
| owning_ints | Inserts `u32` into `HashSet` by copy | ~937 ns/iter | | owning_ints | Inserts `u32` into `HashSet` by copy | ~937 ns/iter |
| non_owning_ints | Inserts `&u32` into `HashRefSet` by reference | ~31,089 ns/iter | | non_owning_ints | Inserts `&u32` into `HashRefSet` by reference | ~31,089 ns/iter |
# When to use over `HashSet` ## When to use over `HashSet`
* The type you're inserting needs to be both in the set and moved elsewhere. (see exmaple) * The type you're inserting needs to be both in the set and moved elsewhere. (see exmaple)
* Simply using `Clone` to insert a copy of the item into a `HashSet` is not possible (non-`Clone` type) or is a significantly heavy operation. (see benchmarks) * Simply using `Clone` to insert a copy of the item into a `HashSet` is not possible (non-`Clone` type) or is a significantly heavy operation. (see benchmarks)
* The fallibility of potential (albeing extremely unlikely) collisions of the SHA512 algorithm is not a concern * The fallibility of potential (albeing extremely unlikely) collisions of the SHA512 algorithm is not a concern

Loading…
Cancel
Save