remove unused const hashing mode (#358)

This commit is contained in:
Dominik Maier 2021-11-06 18:23:10 +01:00 committed by GitHub
parent 5878129d22
commit 72d22ee5e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ rustc_version = "0.4"
criterion = "0.3" # Benchmarking
ahash = "0.7" # another hash
fxhash = "0.2.1" # yet another hash
xxhash-rust = { version = "0.8.2", features = ["xxh3", "const_xxh3"] } # xxh3 hashing for rust
xxhash-rust = { version = "0.8.2", features = ["xxh3"] } # xxh3 hashing for rust
serde_json = "1.0.60"
num_cpus = "1.0" # cpu count, for llmp example
serial_test = "0.5"

View File

@ -1,7 +1,7 @@
//! Compare the speed of rust hash implementations
use std::hash::Hasher;
use xxhash_rust::const_xxh3;
//use xxhash_rust::const_xxh3;
use xxhash_rust::xxh3;
use criterion::{black_box, criterion_group, criterion_main, Criterion};
@ -17,14 +17,14 @@ fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("xxh3", |b| {
b.iter(|| xxh3::xxh3_64_with_seed(black_box(&bench_vec), 0))
});
c.bench_function("const_xxh3", |b| {
/*c.bench_function("const_xxh3", |b| {
b.iter(|| const_xxh3::xxh3_64_with_seed(black_box(&bench_vec), 0))
});
});*/
c.bench_function("ahash", |b| {
b.iter(|| {
let mut hasher = ahash::AHasher::new_with_keys(123, 456);
hasher.write(black_box(&bench_vec));
hasher.finish();
hasher.finish()
})
});
c.bench_function("fxhash", |b| {