Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@ryansg.com>2019-12-10 15:32:25 -0500
committerMike Gerwitz <mike.gerwitz@ryansg.com>2020-02-24 14:56:28 -0500
commit176d099fb61a49492515a0fd35fc19b4f2b70ce9 (patch)
tree3503ce3f2cf27aaf26fcc5cb533b251aa4f96e34 /tamer/Cargo.toml
parent0d2bb5de598019bf203ac9e151031f11df98550d (diff)
downloadtame-176d099fb61a49492515a0fd35fc19b4f2b70ce9.tar.gz
tame-176d099fb61a49492515a0fd35fc19b4f2b70ce9.tar.bz2
tame-176d099fb61a49492515a0fd35fc19b4f2b70ce9.zip
tamer::sym: FNV => Fx Hash
For strings of any notable length, Fx Hash outperforms FNV. Rustc also moved to this hash function and noticed performance improvements. Fortunately, as was accounted for in the design, this was a trivial switch. Here are some benchmarks to back up that claim: test hash_set::fnv::with_all_new_1000 ... bench: 133,096 ns/iter (+/- 1,430) test hash_set::fnv::with_all_new_1000_with_capacity ... bench: 82,591 ns/iter (+/- 592) test hash_set::fnv::with_all_new_rc_str_1000_baseline ... bench: 162,073 ns/iter (+/- 1,277) test hash_set::fnv::with_one_new_1000 ... bench: 37,334 ns/iter (+/- 256) test hash_set::fnv::with_one_new_rc_str_1000_baseline ... bench: 18,263 ns/iter (+/- 261) test hash_set::fx::with_all_new_1000 ... bench: 85,217 ns/iter (+/- 1,111) test hash_set::fx::with_all_new_1000_with_capacity ... bench: 59,383 ns/iter (+/- 752) test hash_set::fx::with_all_new_rc_str_1000_baseline ... bench: 98,802 ns/iter (+/- 1,117) test hash_set::fx::with_one_new_1000 ... bench: 42,484 ns/iter (+/- 1,239) test hash_set::fx::with_one_new_rc_str_1000_baseline ... bench: 15,000 ns/iter (+/- 233) test hash_set::with_all_new_1000 ... bench: 137,645 ns/iter (+/- 1,186) test hash_set::with_all_new_rc_str_1000_baseline ... bench: 163,129 ns/iter (+/- 1,725) test hash_set::with_one_new_1000 ... bench: 59,051 ns/iter (+/- 1,202) test hash_set::with_one_new_rc_str_1000_baseline ... bench: 37,986 ns/iter (+/- 771)
Diffstat (limited to 'tamer/Cargo.toml')
-rw-r--r--tamer/Cargo.toml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tamer/Cargo.toml b/tamer/Cargo.toml
index 82cfaf5..a758e5d 100644
--- a/tamer/Cargo.toml
+++ b/tamer/Cargo.toml
@@ -23,7 +23,7 @@ lto = true
lto = true
[dependencies]
-fnv = ">= 1.0.3"
+fxhash = ">= 0.2.1"
petgraph = ">= 0.4.13"
quick-xml = ">= 0.17.0"
# used by petgraph