aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--.github/workflows/rust.yml38
-rw-r--r--.gitignore3
-rw-r--r--Android.bp24
-rw-r--r--Cargo.toml12
-rw-r--r--Cargo.toml.orig9
-rw-r--r--METADATA10
-rw-r--r--README.md17
-rw-r--r--TEST_MAPPING19
-rw-r--r--build.rs51
-rw-r--r--cargo2android.json5
-rw-r--r--patches/0001-Use-dev-urandom-instead-of-getrandom.patch36
-rw-r--r--patches/Android.bp.diff22
-rw-r--r--smhasher/0001-Add-support-for-aHash.patch135
-rw-r--r--smhasher/0002-Add-support-for-aHash.patch269
-rw-r--r--smhasher/ahashOutput.txt1516
-rwxr-xr-xsmhasher/clone_smhasher.sh1
-rw-r--r--smhasher/fallbackOutput.txt1467
-rw-r--r--src/aes_hash.rs204
-rw-r--r--src/convert.rs16
-rw-r--r--src/fallback_hash.rs220
-rw-r--r--src/hash_map.rs28
-rw-r--r--src/hash_quality_test.rs156
-rw-r--r--src/hash_set.rs23
-rw-r--r--src/lib.rs121
-rw-r--r--src/operations.rs79
-rw-r--r--src/random_state.rs266
-rw-r--r--src/specialize.rs290
-rw-r--r--tests/bench.rs206
-rw-r--r--tests/map_tests.rs29
-rw-r--r--tests/nopanic.rs26
31 files changed, 1218 insertions, 4082 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 55faea7..832d476 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "17a40a93218a9d11c53ff3497f1aac17f3ca0f4e"
+ "sha1": "e77cab8c1e15bfc9f54dfd28bd8820c2a7bb27c4"
}
}
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index e6ba3ad..ba596bf 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -40,6 +40,13 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
+ nightly:
+ name: nightly
+ runs-on: ubuntu-latest
+ env:
+ RUSTFLAGS: -C target-cpu=native
+ steps:
+ - uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
@@ -73,11 +80,9 @@ jobs:
with:
toolchain: stable
target: armv7-unknown-linux-gnueabihf
- override: true
- uses: actions-rs/cargo@v1
with:
- use-cross: true
- command: build
+ command: check
args: --target armv7-unknown-linux-gnueabihf
i686-unknown-linux-gnu:
name: Linux i686
@@ -88,28 +93,35 @@ jobs:
with:
toolchain: stable
target: i686-unknown-linux-gnu
- override: true
+ - name: Install cross compile tools
+ run: sudo apt-get install -y gcc-multilib libc6-i386 libc6-dev-i386
+ - uses: actions-rs/cargo@v1
+ with:
+ command: check
+ args: --target i686-unknown-linux-gnu
- uses: actions-rs/cargo@v1
with:
- use-cross: true
- command: build
+ command: test
args: --target i686-unknown-linux-gnu
x86_64-unknown-linux-gnu:
name: Linux x86_64 - nightly
runs-on: ubuntu-latest
env:
- RUSTFLAGS: -C target-feature=+aes
+ RUSTFLAGS: -C target-cpu=skylake -C target-feature=+aes
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- target: x86_64-unknown-linux-gnu
override: true
+ target: x86_64-unknown-linux-gnu
+ - uses: actions-rs/cargo@v1
+ with:
+ command: check
+ args: --target x86_64-unknown-linux-gnu
- uses: actions-rs/cargo@v1
with:
- use-cross: true
- command: build
+ command: test
args: --target x86_64-unknown-linux-gnu
thumbv6m:
name: thumbv6m
@@ -120,10 +132,8 @@ jobs:
with:
toolchain: stable
target: thumbv6m-none-eabi
- override: true
- uses: actions-rs/cargo@v1
with:
- use-cross: true
command: check
args: --target thumbv6m-none-eabi --no-default-features
wasm32-unknown-unknown:
@@ -135,9 +145,7 @@ jobs:
with:
toolchain: stable
target: wasm32-unknown-unknown
- override: true
- uses: actions-rs/cargo@v1
with:
- use-cross: true
command: check
- args: --target wasm32-unknown-unknown \ No newline at end of file
+ args: --target wasm32-unknown-unknown
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc89f1b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+.idea/
+Cargo.lock
+target
diff --git a/Android.bp b/Android.bp
index a333c9a..9e1253a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,5 @@
-// This file is generated by cargo2android.py --device --run --dependencies.
+// This file is generated by cargo2android.py --config cargo2android.json.
+// Do not modify this file as changes will be overridden on upgrade.
package {
default_applicable_licenses: ["external_rust_crates_ahash_license"],
@@ -38,25 +39,28 @@ license {
rust_library {
name: "libahash",
+ // has rustc warnings
host_supported: true,
crate_name: "ahash",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.7.6",
srcs: ["src/lib.rs"],
edition: "2018",
+ arch: {
+ arm64: {
+ features: ["folded_multiply"],
+ },
+ x86_64: {
+ features: ["folded_multiply"],
+ },
+ },
features: [
"default",
"runtime-rng",
- "specialize",
"std",
],
rustlibs: [
"libgetrandom",
- "liblazy_static",
+ "libonce_cell",
],
}
-
-// dependent_library ["feature_list"]
-// cfg-if-0.1.10
-// getrandom-0.2.0
-// lazy_static-1.4.0
-// libc-0.2.81 "default,std"
-// version_check-0.9.2
diff --git a/Cargo.toml b/Cargo.toml
index db2e142..b412f79 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,9 +13,10 @@
[package]
edition = "2018"
name = "ahash"
-version = "0.6.2"
+version = "0.7.6"
authors = ["Tom Kaitchuck <Tom.Kaitchuck@gmail.com>"]
build = "./build.rs"
+exclude = ["/smhasher", "/benchmark_tools"]
description = "A non-cryptographic hash function using AES-NI for high performance"
documentation = "https://docs.rs/ahash"
readme = "README.md"
@@ -97,14 +98,15 @@ version = "0.1.12"
optional = true
[target."cfg(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\"))".dependencies.getrandom]
-version = "0.2.0"
-
-[target."cfg(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\"))".dependencies.lazy_static]
-version = "1.4.0"
+version = "0.2.3"
[target."cfg(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\"))".dependencies.serde]
version = "1.0.117"
optional = true
+[target."cfg(not(all(target_arch = \"arm\", target_os = \"none\")))".dependencies.once_cell]
+version = "1.8"
+features = ["alloc"]
+default-features = false
[target."cfg(not(any(target_os = \"linux\", target_os = \"android\", target_os = \"windows\", target_os = \"macos\", target_os = \"ios\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"dragonfly\", target_os = \"solaris\", target_os = \"illumos\", target_os = \"fuchsia\", target_os = \"redox\", target_os = \"cloudabi\", target_os = \"haiku\", target_os = \"vxworks\", target_os = \"emscripten\", target_os = \"wasi\")))".dependencies.const-random]
version = "0.1.12"
optional = true
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 1b6fc89..4b56472 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "ahash"
-version = "0.6.2"
+version = "0.7.6"
authors = ["Tom Kaitchuck <Tom.Kaitchuck@gmail.com>"]
license = "MIT OR Apache-2.0"
description = "A non-cryptographic hash function using AES-NI for high performance"
@@ -11,6 +11,7 @@ categories = ["algorithms", "data-structures", "no-std"]
edition = "2018"
readme = "README.md"
build = "./build.rs"
+exclude = ["/smhasher", "/benchmark_tools"]
[lib]
name = "ahash"
@@ -64,8 +65,7 @@ codegen-units = 1
version_check = "0.9"
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "windows", target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd", target_os = "dragonfly", target_os = "solaris", target_os = "illumos", target_os = "fuchsia", target_os = "redox", target_os = "cloudabi", target_os = "haiku", target_os = "vxworks", target_os = "emscripten", target_os = "wasi"))'.dependencies]
-lazy_static = { version = "1.4.0" }
-getrandom = { version = "0.2.0" }
+getrandom = { version = "0.2.3" }
const-random = { version = "0.1.12", optional = true }
serde = { version = "1.0.117", optional = true }
@@ -73,6 +73,9 @@ serde = { version = "1.0.117", optional = true }
const-random = { version = "0.1.12", optional = true }
serde = { version = "1.0.117", optional = true }
+[target.'cfg(not(all(target_arch = "arm", target_os = "none")))'.dependencies]
+once_cell = { version = "1.8", default-features = false, features = ["alloc"] }
+
[dev-dependencies]
no-panic = "0.1.10"
criterion = {version = "0.3.2"}
diff --git a/METADATA b/METADATA
index 3341a13..7ee2368 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/ahash/ahash-0.6.2.crate"
+ value: "https://static.crates.io/crates/ahash/ahash-0.7.6.crate"
}
- version: "0.6.2"
+ version: "0.7.6"
license_type: NOTICE
last_upgrade_date {
- year: 2020
- month: 12
- day: 11
+ year: 2022
+ month: 2
+ day: 28
}
}
diff --git a/README.md b/README.md
index a3e0de4..be365a7 100644
--- a/README.md
+++ b/README.md
@@ -19,17 +19,17 @@ AHash does *not* have a fixed standard for its output. This allows it to improve
if any faster algorithm is found, aHash will be updated to incorporate the technique.
Similarly, should any flaw in aHash's DOS resistance be found, aHash will be changed to correct the flaw.
-Because it does not have a fixed standard, different computers or computers on versions of the code will observe different hash values.
-As such aHash not recommended for use other than in-memory maps. Specifically, aHash is not intended for network use or in applications which persist hashed values.
+Because it does not have a fixed standard, different computers or computers on different versions of the code will observe different hash values.
+As such, aHash is not recommended for use other than in-memory maps. Specifically, aHash is not intended for network use or in applications which persist hashed values.
(In these cases `HighwayHash` would be a better choice)
-Additionally, aHash is not intended to be cryptographly secure and should not be used as a MAC, or anywhere which requires a cryptographically secure hash.
+Additionally, aHash is not intended to be cryptographically secure and should not be used as a MAC, or anywhere which requires a cryptographically secure hash.
(In these cases `SHA-3` would be a better choice)
## Usage
AHash is a drop in replacement for the default implementation of the `Hasher` trait. To construct a `HashMap` using aHash
-its hasher do the following:
+as its hasher do the following:
```rust
use ahash::{AHasher, RandomState};
@@ -38,8 +38,8 @@ use std::collections::HashMap;
let mut map: HashMap<i32, i32, RandomState> = HashMap::default();
map.insert(12, 34);
```
-For convinence wrappers called `AHashMap` and `AHashSet` are also provided.
-These to the same thing with slightly less typing.
+For convenience, wrappers called `AHashMap` and `AHashSet` are also provided.
+These do the same thing with slightly less typing.
```rust
use ahash::AHashMap;
@@ -52,6 +52,7 @@ map.insert(56, 78);
The aHash package has the following flags:
* `std`: This enables features which require the standard library. (On by default) This includes providing the utility classes `AHashMap` and `AHashSet`.
+* `serde`: Enables `serde` support for the utility classes `AHashMap` and `AHashSet`.
* `compile-time-rng`: Whenever possible aHash will seed hashers with random numbers using the [getrandom](https://github.com/rust-random/getrandom) crate.
This is possible for OS targets which provide a source of randomness. (see the [full list](https://docs.rs/getrandom/0.2.0/getrandom/#supported-targets).)
For OS targets without access to a random number generator, `compile-time-rng` provides an alternative.
@@ -69,9 +70,9 @@ random numbers will not be available at runtime.
A full comparison with other hashing algorithms can be found [here](https://github.com/tkaitchuck/aHash/blob/master/compare/readme.md)
-![Hasher perfromance](https://docs.google.com/spreadsheets/d/e/2PACX-1vSK7Li2nS-Bur9arAYF9IfT37MP-ohAe1v19lZu5fd9MajI1fSveLAQZyEie4Ea9k5-SWHTff7nL2DW/pubchart?oid=1323618938&format=image)
+![Hasher performance](https://docs.google.com/spreadsheets/d/e/2PACX-1vSK7Li2nS-Bur9arAYF9IfT37MP-ohAe1v19lZu5fd9MajI1fSveLAQZyEie4Ea9k5-SWHTff7nL2DW/pubchart?oid=1323618938&format=image)
-For more a more representative performance comparison which includes the overhead of using a HashMap, see [HashBrown's benchmarks](https://github.com/rust-lang/hashbrown#performance)
+For a more representative performance comparison which includes the overhead of using a HashMap, see [HashBrown's benchmarks](https://github.com/rust-lang/hashbrown#performance)
as HashBrown now uses aHash as its hasher by default.
## Hash quality
diff --git a/TEST_MAPPING b/TEST_MAPPING
new file mode 100644
index 0000000..91f37bf
--- /dev/null
+++ b/TEST_MAPPING
@@ -0,0 +1,19 @@
+// Generated by update_crate_tests.py for tests that depend on this crate.
+{
+ "presubmit": [
+ {
+ "name": "keystore2_test"
+ },
+ {
+ "name": "legacykeystore_test"
+ }
+ ],
+ "presubmit-rust": [
+ {
+ "name": "keystore2_test"
+ },
+ {
+ "name": "legacykeystore_test"
+ }
+ ]
+}
diff --git a/build.rs b/build.rs
index 3f8d6f7..8be4964 100644
--- a/build.rs
+++ b/build.rs
@@ -7,26 +7,39 @@ fn main() {
if let Some(channel) = version_check::Channel::read() {
if channel.supports_features() {
println!("cargo:rustc-cfg=feature=\"specialize\"");
+ println!("cargo:rustc-cfg=feature=\"stdsimd\"");
}
}
let os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS was not set");
- if os.eq_ignore_ascii_case("linux") ||
- os.eq_ignore_ascii_case("android") ||
- os.eq_ignore_ascii_case("windows") ||
- os.eq_ignore_ascii_case("macos") ||
- os.eq_ignore_ascii_case("ios") ||
- os.eq_ignore_ascii_case("freebsd") ||
- os.eq_ignore_ascii_case("openbsd") ||
- os.eq_ignore_ascii_case("dragonfly") ||
- os.eq_ignore_ascii_case("solaris") ||
- os.eq_ignore_ascii_case("illumos") ||
- os.eq_ignore_ascii_case("fuchsia") ||
- os.eq_ignore_ascii_case("redox") ||
- os.eq_ignore_ascii_case("cloudabi") ||
- os.eq_ignore_ascii_case("haiku") ||
- os.eq_ignore_ascii_case("vxworks") ||
- os.eq_ignore_ascii_case("emscripten") ||
- os.eq_ignore_ascii_case("wasi") {
- println!("cargo:rustc-cfg=feature=\"runtime-rng\"");
+ if os.eq_ignore_ascii_case("linux")
+ || os.eq_ignore_ascii_case("android")
+ || os.eq_ignore_ascii_case("windows")
+ || os.eq_ignore_ascii_case("macos")
+ || os.eq_ignore_ascii_case("ios")
+ || os.eq_ignore_ascii_case("freebsd")
+ || os.eq_ignore_ascii_case("openbsd")
+ || os.eq_ignore_ascii_case("dragonfly")
+ || os.eq_ignore_ascii_case("solaris")
+ || os.eq_ignore_ascii_case("illumos")
+ || os.eq_ignore_ascii_case("fuchsia")
+ || os.eq_ignore_ascii_case("redox")
+ || os.eq_ignore_ascii_case("cloudabi")
+ || os.eq_ignore_ascii_case("haiku")
+ || os.eq_ignore_ascii_case("vxworks")
+ || os.eq_ignore_ascii_case("emscripten")
+ || os.eq_ignore_ascii_case("wasi")
+ {
+ println!("cargo:rustc-cfg=feature=\"runtime-rng\"");
}
-} \ No newline at end of file
+ let arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH was not set");
+ if arch.eq_ignore_ascii_case("x86_64")
+ || arch.eq_ignore_ascii_case("aarch64")
+ || arch.eq_ignore_ascii_case("mips64")
+ || arch.eq_ignore_ascii_case("powerpc64")
+ || arch.eq_ignore_ascii_case("riscv64gc")
+ || arch.eq_ignore_ascii_case("s390x")
+ {
+ println!("cargo:rustc-cfg=feature=\"folded_multiply\"");
+ }
+
+}
diff --git a/cargo2android.json b/cargo2android.json
new file mode 100644
index 0000000..0f12cfd
--- /dev/null
+++ b/cargo2android.json
@@ -0,0 +1,5 @@
+{
+ "device": true,
+ "patch": "patches/Android.bp.diff",
+ "run": true
+} \ No newline at end of file
diff --git a/patches/0001-Use-dev-urandom-instead-of-getrandom.patch b/patches/0001-Use-dev-urandom-instead-of-getrandom.patch
index d5adff0..c5f4df3 100644
--- a/patches/0001-Use-dev-urandom-instead-of-getrandom.patch
+++ b/patches/0001-Use-dev-urandom-instead-of-getrandom.patch
@@ -17,12 +17,12 @@ Bug: 185934601
Change-Id: Ie81a1f3a893d578348db11aee114d1a8f2d9fac5
---
diff --git a/src/random_state.rs b/src/random_state.rs
-index 501e3eb..9b3b3d0 100644
+index c3628bf..835467c 100644
--- a/src/random_state.rs
+++ b/src/random_state.rs
-@@ -10,11 +10,22 @@ use core::hash::Hasher;
- use lazy_static::*;
- use core::sync::atomic::{AtomicUsize, Ordering};
+@@ -48,6 +48,15 @@ use crate::fallback_hash::*;
+ #[cfg(not(all(target_arch = "arm", target_os = "none")))]
+ static RAND_SOURCE: OnceBox<Box<dyn RandomSource + Send + Sync>> = OnceBox::new();
+#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
+fn read_urandom(dest: &mut [u8]) -> Result<(), std::io::Error> {
@@ -33,17 +33,17 @@ index 501e3eb..9b3b3d0 100644
+ f.read_exact(dest)
+}
+
- #[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
- lazy_static! {
- static ref SEEDS: [[u64; 4]; 2] = {
- let mut result: [u8; 64] = [0; 64];
-- getrandom::getrandom(&mut result).expect("getrandom::getrandom() failed.");
-+ if read_urandom(&mut result).is_err() {
-+ getrandom::getrandom(&mut result).expect("getrandom::getrandom() failed.")
-+ }
- result.convert()
- };
- }
---
-2.31.1.498.g6c1eba8ee3d-goog
-
+ /// A supplier of Randomness used for different hashers.
+ /// See [RandomState.set_random_source].
+ pub trait RandomSource {
+@@ -98,7 +107,9 @@ impl RandomSource for DefaultRandomSource {
+
+ SEEDS.get_or_init(|| {
+ let mut result: [u8; 64] = [0; 64];
+- getrandom::getrandom(&mut result).expect("getrandom::getrandom() failed.");
++ if read_urandom(&mut result).is_err() {
++ getrandom::getrandom(&mut result).expect("getrandom::getrandom() failed.");
++ }
+ Box::new(result.convert())
+ })
+ }
diff --git a/patches/Android.bp.diff b/patches/Android.bp.diff
new file mode 100644
index 0000000..1c3d18b
--- /dev/null
+++ b/patches/Android.bp.diff
@@ -0,0 +1,22 @@
+diff --git a/Android.bp b/Android.bp
+index b6d9875..14124db 100644
+--- a/Android.bp
++++ b/Android.bp
+@@ -44,9 +44,16 @@ rust_library {
+ crate_name: "ahash",
+ srcs: ["src/lib.rs"],
+ edition: "2018",
++ arch: {
++ arm64: {
++ features: ["folded_multiply"],
++ },
++ x86_64: {
++ features: ["folded_multiply"],
++ },
++ },
+ features: [
+ "default",
+- "folded_multiply",
+ "runtime-rng",
+ "specialize",
+ "std",
diff --git a/smhasher/0001-Add-support-for-aHash.patch b/smhasher/0001-Add-support-for-aHash.patch
deleted file mode 100644
index 99a98d3..0000000
--- a/smhasher/0001-Add-support-for-aHash.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 426384ce34cf410d892eeeeeb7f6046d52bff8e7 Mon Sep 17 00:00:00 2001
-From: Tom Kaitchuck <Tom.Kaitchuck@gmail.com>
-Date: Sat, 11 Jul 2020 17:15:56 -0700
-Subject: [PATCH] Add support for ahash
-
----
- CMakeLists.txt | 1 +
- Hashes.h | 5 +++++
- ahash.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
- main.cpp | 2 +-
- 4 files changed, 55 insertions(+), 1 deletion(-)
- create mode 100644 ahash.h
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6ebab1a..9d79e98 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -470,10 +470,11 @@ add_executable(
- target_link_libraries(
- SMHasher
- SMHasherSupport
- ${HIGHWAY_LIB}
- ${BLAKE3_LIB}
-+ libahash_c.a
- ${CMAKE_THREAD_LIBS_INIT}
- )
-
- #add_executable(
- # bittest
-diff --git a/Hashes.h b/Hashes.h
-index 4e111c1..fcd3e38 100644
---- a/Hashes.h
-+++ b/Hashes.h
-@@ -19,10 +19,11 @@
- #if defined(__SSE4_2__) && defined(__x86_64__)
- #include "metrohash/metrohash64crc.h"
- #include "metrohash/metrohash128crc.h"
- #endif
-
-+#include "ahash.h"
- #include "fasthash.h"
- #include "jody_hash32.h"
- #include "jody_hash64.h"
-
- // objsize: 0-0x113 = 276
-@@ -356,10 +357,14 @@ inline void fasthash32_test ( const void * key, int len, uint32_t seed, void * o
- }
- #ifdef HAVE_INT64
- inline void fasthash64_test ( const void * key, int len, uint32_t seed, void * out ) {
- *(uint64_t*)out = fasthash64(key, (size_t) len, (uint64_t)seed);
- }
-+inline void ahash64_test ( const void * key, int len, uint32_t seed, void * out ) {
-+ *(uint64_t*)out = ahash64(key, (size_t) len, (uint64_t)seed);
-+}
-+
- #endif
-
- // objsize 0-778: 1912
- void mum_hash_test(const void * key, int len, uint32_t seed, void * out);
-
-diff --git a/ahash.h b/ahash.h
-new file mode 100644
-index 0000000..6c59caf
---- /dev/null
-+++ b/ahash.h
-@@ -0,0 +1,48 @@
-+/* The MIT License
-+
-+ Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com)
-+
-+ Permission is hereby granted, free of charge, to any person
-+ obtaining a copy of this software and associated documentation
-+ files (the "Software"), to deal in the Software without
-+ restriction, including without limitation the rights to use, copy,
-+ modify, merge, publish, distribute, sublicense, and/or sell copies
-+ of the Software, and to permit persons to whom the Software is
-+ furnished to do so, subject to the following conditions:
-+
-+ The above copyright notice and this permission notice shall be
-+ included in all copies or substantial portions of the Software.
-+
-+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ SOFTWARE.
-+*/
-+
-+#ifndef _AHASH_H
-+#define _AHASH_H
-+
-+#include <stdint.h>
-+#include <stdio.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/**
-+ * Ahash - 64-bit implementation of aHash
-+ * @buf: data buffer
-+ * @len: data size
-+ * @seed: the seed
-+ */
-+ uint64_t ahash64(const void *buf, size_t len, uint64_t seed);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-\ No newline at end of file
-diff --git a/main.cpp b/main.cpp
-index 04060f2..7489aaf 100644
---- a/main.cpp
-+++ b/main.cpp
-@@ -263,11 +263,11 @@ HashInfo g_hashes[] =
-
- { xxh3_test, 64, 0x39CD9E4A, "xxh3", "xxHash v3, 64-bit", GOOD },
- { xxh3low_test, 32, 0xFAE8467B, "xxh3low", "xxHash v3, 64-bit, low 32-bits part", GOOD },
- { xxh128_test, 128, 0xEB61B3A0, "xxh128", "xxHash v3, 128-bit", GOOD },
- { xxh128low_test, 64, 0x54D1CC70, "xxh128low", "xxHash v3, 128-bit, low 64-bits part", GOOD },
--
-+ { ahash64_test, 64, 0x00000000, "ahash64", "ahash 64bit", GOOD }, //Expected value set to zero because aHash does not adhere to a fixed output.
- #if __WORDSIZE >= 64
- # define TIFU_VERIF 0x644236D4
- #else
- // broken on certain travis
- # define TIFU_VERIF 0x0
---
-2.25.1
-
diff --git a/smhasher/0002-Add-support-for-aHash.patch b/smhasher/0002-Add-support-for-aHash.patch
deleted file mode 100644
index 93ccbff..0000000
--- a/smhasher/0002-Add-support-for-aHash.patch
+++ /dev/null
@@ -1,269 +0,0 @@
-From 426384ce34cf410d892eeeeeb7f6046d52bff8e7 Mon Sep 17 00:00:00 2001
-From: Tom Kaitchuck <Tom.Kaitchuck@gmail.com>
-Date: Sat, 11 Jul 2020 17:15:56 -0700
-Subject: [PATCH] Add support for ahash
-
----
- CMakeLists.txt | 1 +
- Hashes.h | 5 +++++
- ahash.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
- main.cpp | 2 +-
- 4 files changed, 55 insertions(+), 1 deletion(-)
- create mode 100644 ahash.h
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 6ebab1a..9d79e98 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -470,10 +470,11 @@ add_executable(
- target_link_libraries(
- SMHasher
- SMHasherSupport
- ${HIGHWAY_LIB}
- ${BLAKE3_LIB}
-+ libahash_c.a
- ${CMAKE_THREAD_LIBS_INIT}
- )
-
- #add_executable(
- # bittest
-diff --git a/Hashes.h b/Hashes.h
-index 4e111c1..fcd3e38 100644
---- a/Hashes.h
-+++ b/Hashes.h
-@@ -19,10 +19,11 @@
- #if defined(__SSE4_2__) && defined(__x86_64__)
- #include "metrohash/metrohash64crc.h"
- #include "metrohash/metrohash128crc.h"
- #endif
-
-+#include "ahash.h"
- #include "fasthash.h"
- #include "jody_hash32.h"
- #include "jody_hash64.h"
-
- // objsize: 0-0x113 = 276
-@@ -356,10 +357,14 @@ inline void fasthash32_test ( const void * key, int len, uint32_t seed, void * o
- }
- #ifdef HAVE_INT64
- inline void fasthash64_test ( const void * key, int len, uint32_t seed, void * out ) {
- *(uint64_t*)out = fasthash64(key, (size_t) len, (uint64_t)seed);
- }
-+inline void ahash64_test ( const void * key, int len, uint32_t seed, void * out ) {
-+ *(uint64_t*)out = ahash64(key, (size_t) len, (uint64_t)seed);
-+}
-+
- #endif
-
- // objsize 0-778: 1912
- void mum_hash_test(const void * key, int len, uint32_t seed, void * out);
-
-diff --git a/ahash.h b/ahash.h
-new file mode 100644
-index 0000000..6c59caf
---- /dev/null
-+++ b/ahash.h
-@@ -0,0 +1,48 @@
-+/* The MIT License
-+
-+ Copyright (C) 2012 Zilong Tan (eric.zltan@gmail.com)
-+
-+ Permission is hereby granted, free of charge, to any person
-+ obtaining a copy of this software and associated documentation
-+ files (the "Software"), to deal in the Software without
-+ restriction, including without limitation the rights to use, copy,
-+ modify, merge, publish, distribute, sublicense, and/or sell copies
-+ of the Software, and to permit persons to whom the Software is
-+ furnished to do so, subject to the following conditions:
-+
-+ The above copyright notice and this permission notice shall be
-+ included in all copies or substantial portions of the Software.
-+
-+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ SOFTWARE.
-+*/
-+
-+#ifndef _AHASH_H
-+#define _AHASH_H
-+
-+#include <stdint.h>
-+#include <stdio.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/**
-+ * Ahash - 64-bit implementation of aHash
-+ * @buf: data buffer
-+ * @len: data size
-+ * @seed: the seed
-+ */
-+ uint64_t ahash64(const void *buf, size_t len, uint64_t seed);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-\ No newline at end of file
-diff --git a/main.cpp b/main.cpp
-index 04060f2..7489aaf 100644
---- a/main.cpp
-+++ b/main.cpp
-@@ -263,11 +263,11 @@ HashInfo g_hashes[] =
-
- { xxh3_test, 64, 0x39CD9E4A, "xxh3", "xxHash v3, 64-bit", GOOD },
- { xxh3low_test, 32, 0xFAE8467B, "xxh3low", "xxHash v3, 64-bit, low 32-bits part", GOOD },
- { xxh128_test, 128, 0xEB61B3A0, "xxh128", "xxHash v3, 128-bit", GOOD },
- { xxh128low_test, 64, 0x54D1CC70, "xxh128low", "xxHash v3, 128-bit, low 64-bits part", GOOD },
--
-+ { ahash64_test, 64, 0x00000000, "ahash64", "ahash 64bit", GOOD }, //Expected value set to zero because aHash does not adhere to a fixed output.
- #if __WORDSIZE >= 64
- # define TIFU_VERIF 0x644236D4
- #else
- // broken on certain travis
- # define TIFU_VERIF 0x0
---
-2.25.1
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e4658a7..efef724 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -630,20 +630,21 @@ if(ipo_supported)
- set_property(TARGET SMHasherSupport PROPERTY INTERPROCEDURAL_OPTIMIZATION
- True)
- set_property(TARGET SMHasher PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLTO")
- # set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS "-DLTO")
- else()
- message(STATUS "IPO / LTO not supported: <${error}>")
- endif()
-
- target_link_libraries(SMHasher SMHasherSupport ${HIGHWAY_LIB} ${BLAKE3_LIB}
-+ libahash_c.a
- ${CMAKE_THREAD_LIBS_INIT})
-
- # add_executable( bittest bittest.cpp )
- #
- # target_link_libraries( bittest SMHasherSupport ${CMAKE_THREAD_LIBS_INIT} )
-
- if(NOT (CMAKE_CROSSCOMPILING))
- enable_testing()
- add_test(VerifyAll SMHasher --test=VerifyAll)
- add_test(Sanity SMHasher --test=Sanity)
-diff --git a/Hashes.h b/Hashes.h
-index f795403..036b49b 100644
---- a/Hashes.h
-+++ b/Hashes.h
-@@ -14,20 +14,21 @@
- #include "metrohash/metrohash64.h"
- #include "metrohash/metrohash128.h"
- #include "cmetrohash.h"
- #include "opt_cmetrohash.h"
-
- #if defined(__SSE4_2__) && defined(__x86_64__)
- #include "metrohash/metrohash64crc.h"
- #include "metrohash/metrohash128crc.h"
- #endif
-
-+#include "ahash.h"
- #include "fasthash.h"
- #include "jody_hash32.h"
- #include "jody_hash64.h"
-
- // objsize: 0-0x113 = 276
- #include "tifuhash.h"
- // objsize: 5f0-85f = 623
- #include "floppsyhash.h"
-
- #include "vmac.h"
-@@ -353,20 +354,24 @@ inline void cmetrohash64_2_test ( const void * key, int len, uint32_t seed, void
- }
- #endif
-
- inline void fasthash32_test ( const void * key, int len, uint32_t seed, void * out ) {
- *(uint32_t*)out = fasthash32(key, (size_t) len, seed);
- }
- #ifdef HAVE_INT64
- inline void fasthash64_test ( const void * key, int len, uint32_t seed, void * out ) {
- *(uint64_t*)out = fasthash64(key, (size_t) len, (uint64_t)seed);
- }
-+
-+inline void ahash64_test ( const void * key, int len, uint32_t seed, void * out ) {
-+ *(uint64_t*)out = ahash64(key, (size_t) len, (uint64_t)seed);
-+}
- #endif
-
- // objsize 0-778: 1912
- void mum_hash_test(const void * key, int len, uint32_t seed, void * out);
-
- inline void mum_low_test ( const void * key, int len, uint32_t seed, void * out ) {
- uint64_t result;
- mum_hash_test(key, len, seed, &result);
- *(uint32_t*)out = (uint32_t)result;
- }
-diff --git a/ahash.h b/ahash.h
-new file mode 100644
-index 0000000..2ed416d
---- /dev/null
-+++ b/ahash.h
-@@ -0,0 +1,24 @@
-+
-+#ifndef _AHASH_H
-+#define _AHASH_H
-+
-+#include <stdint.h>
-+#include <stdio.h>
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+/**
-+ * Ahash - 64-bit implementation of aHash
-+ * @buf: data buffer
-+ * @len: data size
-+ * @seed: the seed
-+ */
-+ uint64_t ahash64(const void *buf, size_t len, uint64_t seed);
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-\ No newline at end of file
-diff --git a/main.cpp b/main.cpp
-index f742fbf..c221f7d 100644
---- a/main.cpp
-+++ b/main.cpp
-@@ -434,20 +434,21 @@ HashInfo g_hashes[] =
- { t1ha0_ia32aes_avx1_test, 64, 0xF07C4DA5, "t1ha0_aes_avx1", "Fast Positive Hash (machine-specific, requires AES-NI & AVX)", GOOD },
- # endif /* __AVX__ */
- # if defined(__AVX2__)
- { t1ha0_ia32aes_avx2_test, 64, 0x8B38C599, "t1ha0_aes_avx2", "Fast Positive Hash (machine-specific, requires AES-NI & AVX2)", GOOD },
- # endif /* __AVX2__ */
- #endif /* T1HA0_AESNI_AVAILABLE */
- { xxh3_test, 64, 0x39CD9E4A, "xxh3", "xxHash v3, 64-bit", GOOD },
- { xxh3low_test, 32, 0xFAE8467B, "xxh3low", "xxHash v3, 64-bit, low 32-bits part", GOOD },
- { xxh128_test, 128, 0xEB61B3A0, "xxh128", "xxHash v3, 128-bit", GOOD },
- { xxh128low_test, 64, 0x54D1CC70, "xxh128low", "xxHash v3, 128-bit, low 64-bits part", GOOD },
-+ { ahash64_test, 64, 0x00000000, "ahash64", "ahash 64bit", GOOD }, //Expected value set to zero because aHash does not adhere to a fixed output.
- #ifdef HAVE_BIT32
- { wyhash32_test, 32, 0x09DE8066, "wyhash32", "wyhash (32-bit)", GOOD },
- #else
- { wyhash32low, 32, 0x9241B8A3, "wyhash32low", "wyhash lower 32bit", GOOD },
- #endif
- #ifdef HAVE_INT64
- { wyhash_test, 64, 0x7C62138D, "wyhash", "wyhash (64-bit)", GOOD },
- #endif
-
- };
diff --git a/smhasher/ahashOutput.txt b/smhasher/ahashOutput.txt
deleted file mode 100644
index 3bc122b..0000000
--- a/smhasher/ahashOutput.txt
+++ /dev/null
@@ -1,1516 +0,0 @@
--------------------------------------------------------------------------------
---- Testing ahash64 "ahash 64bit" GOOD
-
-[[[ Sanity Tests ]]]
-
-Verification value 0x84A46E17 ....... SKIP (self- or unseeded)
-Running sanity check 1 .......... PASS
-Running AppendedZeroesTest .......... PASS
-
-[[[ Speed Tests ]]]
-
-Bulk speed test - 262144-byte keys
-Alignment 7 - 8.351 bytes/cycle - 23891.85 MiB/sec @ 3 ghz
-Alignment 6 - 8.327 bytes/cycle - 23823.64 MiB/sec @ 3 ghz
-Alignment 5 - 8.312 bytes/cycle - 23780.76 MiB/sec @ 3 ghz
-Alignment 4 - 8.309 bytes/cycle - 23772.79 MiB/sec @ 3 ghz
-Alignment 3 - 8.315 bytes/cycle - 23790.37 MiB/sec @ 3 ghz
-Alignment 2 - 8.339 bytes/cycle - 23858.92 MiB/sec @ 3 ghz
-Alignment 1 - 8.320 bytes/cycle - 23804.48 MiB/sec @ 3 ghz
-Alignment 0 - 8.364 bytes/cycle - 23930.33 MiB/sec @ 3 ghz
-Average - 8.330 bytes/cycle - 23831.64 MiB/sec @ 3 ghz
-
-Small key speed test - 1-byte keys - 11.98 cycles/hash
-Small key speed test - 2-byte keys - 12.95 cycles/hash
-Small key speed test - 3-byte keys - 13.00 cycles/hash
-Small key speed test - 4-byte keys - 14.00 cycles/hash
-Small key speed test - 5-byte keys - 14.28 cycles/hash
-Small key speed test - 6-byte keys - 13.98 cycles/hash
-Small key speed test - 7-byte keys - 14.24 cycles/hash
-Small key speed test - 8-byte keys - 14.28 cycles/hash
-Small key speed test - 9-byte keys - 14.18 cycles/hash
-Small key speed test - 10-byte keys - 14.29 cycles/hash
-Small key speed test - 11-byte keys - 14.12 cycles/hash
-Small key speed test - 12-byte keys - 14.00 cycles/hash
-Small key speed test - 13-byte keys - 14.00 cycles/hash
-Small key speed test - 14-byte keys - 14.00 cycles/hash
-Small key speed test - 15-byte keys - 14.23 cycles/hash
-Small key speed test - 16-byte keys - 14.00 cycles/hash
-Small key speed test - 17-byte keys - 16.05 cycles/hash
-Small key speed test - 18-byte keys - 16.14 cycles/hash
-Small key speed test - 19-byte keys - 16.00 cycles/hash
-Small key speed test - 20-byte keys - 16.17 cycles/hash
-Small key speed test - 21-byte keys - 16.00 cycles/hash
-Small key speed test - 22-byte keys - 16.07 cycles/hash
-Small key speed test - 23-byte keys - 16.13 cycles/hash
-Small key speed test - 24-byte keys - 15.99 cycles/hash
-Small key speed test - 25-byte keys - 16.12 cycles/hash
-Small key speed test - 26-byte keys - 15.99 cycles/hash
-Small key speed test - 27-byte keys - 16.00 cycles/hash
-Small key speed test - 28-byte keys - 16.30 cycles/hash
-Small key speed test - 29-byte keys - 18.11 cycles/hash
-Small key speed test - 30-byte keys - 18.52 cycles/hash
-Small key speed test - 31-byte keys - 17.98 cycles/hash
-Average 15.132 cycles/hash
-
-[[[ 'Hashmap' Speed Tests ]]]
-
-std::unordered_map
-Init std HashMapTest: 270.009 cycles/op (102401 inserts, 1% deletions)
-Running std HashMapTest: 120.593 cycles/op (3.6 stdv)
-
-greg7mdp/parallel-hashmap
-Init fast HashMapTest: 110.896 cycles/op (102401 inserts, 1% deletions)
-Running fast HashMapTest: 81.841 cycles/op (0.1 stdv) ....... PASS
-
-[[[ Avalanche Tests ]]]
-
-Testing 24-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.702667%
-Testing 32-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.670667%
-Testing 40-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.608667%
-Testing 48-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.670667%
-Testing 56-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.670000%
-Testing 64-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.663333%
-Testing 72-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.780667%
-Testing 80-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.716000%
-Testing 96-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.621333%
-Testing 112-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.642667%
-Testing 128-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.629333%
-Testing 160-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.747333%
-Testing 512-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.757333%
-Testing 1024-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.820000%
-
-[[[ Keyset 'Sparse' Tests ]]]
-
-Keyset 'Sparse' - 16-bit keys with up to 9 bits set - 50643 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 0.3, actual 1 (3.35x) (1) !
-Testing collisions (high 19-25 bits) - Worst is 24 bits: 90/76 (1.18x)
-Testing collisions (high 12-bit) - Expected 46547.0, actual 46547 (1.00x)
-Testing collisions (high 8-bit) - Expected 50387.0, actual 50387 (1.00x)
-Testing collisions (low 32-bit) - Expected 0.3, actual 0 (0.00x)
-Testing collisions (low 19-25 bits) - Worst is 25 bits: 39/38 (1.02x)
-Testing collisions (low 12-bit) - Expected 46547.0, actual 46547 (1.00x)
-Testing collisions (low 8-bit) - Expected 50387.0, actual 50387 (1.00x)
-Testing distribution - Worst bias is the 13-bit window at bit 55 - 0.572%
-
-Keyset 'Sparse' - 24-bit keys with up to 8 bits set - 1271626 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 188.2, actual 174 (0.92x)
-Testing collisions (high 24-35 bits) - Worst is 26 bits: 12182/12047 (1.01x)
-Testing collisions (high 12-bit) - Expected 1267530.0, actual 1267530 (1.00x)
-Testing collisions (high 8-bit) - Expected 1271370.0, actual 1271370 (1.00x)
-Testing collisions (low 32-bit) - Expected 188.2, actual 201 (1.07x) (13)
-Testing collisions (low 24-35 bits) - Worst is 32 bits: 201/188 (1.07x)
-Testing collisions (low 12-bit) - Expected 1267530.0, actual 1267530 (1.00x)
-Testing collisions (low 8-bit) - Expected 1271370.0, actual 1271370 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 53 - 0.082%
-
-Keyset 'Sparse' - 32-bit keys with up to 7 bits set - 4514873 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 2373.0, actual 2366 (1.00x) (-7)
-Testing collisions (high 25-38 bits) - Worst is 30 bits: 9627/9492 (1.01x)
-Testing collisions (high 12-bit) - Expected 4510777.0, actual 4510777 (1.00x)
-Testing collisions (high 8-bit) - Expected 4514617.0, actual 4514617 (1.00x)
-Testing collisions (low 32-bit) - Expected 2373.0, actual 2295 (0.97x)
-Testing collisions (low 25-38 bits) - Worst is 30 bits: 9493/9492 (1.00x)
-Testing collisions (low 12-bit) - Expected 4510777.0, actual 4510777 (1.00x)
-Testing collisions (low 8-bit) - Expected 4514617.0, actual 4514617 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 12 - 0.048%
-
-Keyset 'Sparse' - 40-bit keys with up to 6 bits set - 4598479 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 2461.7, actual 2561 (1.04x) (100)
-Testing collisions (high 25-38 bits) - Worst is 32 bits: 2561/2461 (1.04x)
-Testing collisions (high 12-bit) - Expected 4594383.0, actual 4594383 (1.00x)
-Testing collisions (high 8-bit) - Expected 4598223.0, actual 4598223 (1.00x)
-Testing collisions (low 32-bit) - Expected 2461.7, actual 2444 (0.99x) (-17)
-Testing collisions (low 25-38 bits) - Worst is 35 bits: 323/307 (1.05x)
-Testing collisions (low 12-bit) - Expected 4594383.0, actual 4594383 (1.00x)
-Testing collisions (low 8-bit) - Expected 4598223.0, actual 4598223 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 2 - 0.056%
-
-Keyset 'Sparse' - 48-bit keys with up to 6 bits set - 14196869 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 23463.6, actual 23431 (1.00x) (-32)
-Testing collisions (high 27-42 bits) - Worst is 37 bits: 747/733 (1.02x)
-Testing collisions (high 12-bit) - Expected 14192773.0, actual 14192773 (1.00x)
-Testing collisions (high 8-bit) - Expected 14196613.0, actual 14196613 (1.00x)
-Testing collisions (low 32-bit) - Expected 23463.6, actual 23284 (0.99x) (-179)
-Testing collisions (low 27-42 bits) - Worst is 41 bits: 51/45 (1.11x)
-Testing collisions (low 12-bit) - Expected 14192773.0, actual 14192773 (1.00x)
-Testing collisions (low 8-bit) - Expected 14196613.0, actual 14196613 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 44 - 0.029%
-
-Keyset 'Sparse' - 56-bit keys with up to 5 bits set - 4216423 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 2069.7, actual 2053 (0.99x) (-16)
-Testing collisions (high 25-38 bits) - Worst is 31 bits: 4136/4139 (1.00x)
-Testing collisions (high 12-bit) - Expected 4212327.0, actual 4212327 (1.00x)
-Testing collisions (high 8-bit) - Expected 4216167.0, actual 4216167 (1.00x)
-Testing collisions (low 32-bit) - Expected 2069.7, actual 2058 (0.99x) (-11)
-Testing collisions (low 25-38 bits) - Worst is 30 bits: 8320/8278 (1.00x)
-Testing collisions (low 12-bit) - Expected 4212327.0, actual 4212327 (1.00x)
-Testing collisions (low 8-bit) - Expected 4216167.0, actual 4216167 (1.00x)
-Testing distribution - Worst bias is the 18-bit window at bit 26 - 0.051%
-
-Keyset 'Sparse' - 64-bit keys with up to 5 bits set - 8303633 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8026.9, actual 8024 (1.00x) (-2)
-Testing collisions (high 26-40 bits) - Worst is 37 bits: 267/250 (1.06x)
-Testing collisions (high 12-bit) - Expected 8299537.0, actual 8299537 (1.00x)
-Testing collisions (high 8-bit) - Expected 8303377.0, actual 8303377 (1.00x)
-Testing collisions (low 32-bit) - Expected 8026.9, actual 8006 (1.00x) (-20)
-Testing collisions (low 26-40 bits) - Worst is 40 bits: 34/31 (1.08x)
-Testing collisions (low 12-bit) - Expected 8299537.0, actual 8299537 (1.00x)
-Testing collisions (low 8-bit) - Expected 8303377.0, actual 8303377 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 25 - 0.041%
-
-Keyset 'Sparse' - 72-bit keys with up to 5 bits set - 15082603 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 26482.7, actual 26443 (1.00x) (-39)
-Testing collisions (high 27-42 bits) - Worst is 42 bits: 33/25 (1.28x)
-Testing collisions (high 12-bit) - Expected 15078507.0, actual 15078507 (1.00x)
-Testing collisions (high 8-bit) - Expected 15082347.0, actual 15082347 (1.00x)
-Testing collisions (low 32-bit) - Expected 26482.7, actual 26586 (1.00x) (104)
-Testing collisions (low 27-42 bits) - Worst is 42 bits: 29/25 (1.12x)
-Testing collisions (low 12-bit) - Expected 15078507.0, actual 15078507 (1.00x)
-Testing collisions (low 8-bit) - Expected 15082347.0, actual 15082347 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 31 - 0.033%
-
-Keyset 'Sparse' - 96-bit keys with up to 4 bits set - 3469497 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1401.3, actual 1457 (1.04x) (56)
-Testing collisions (high 25-38 bits) - Worst is 32 bits: 1457/1401 (1.04x)
-Testing collisions (high 12-bit) - Expected 3465401.0, actual 3465401 (1.00x)
-Testing collisions (high 8-bit) - Expected 3469241.0, actual 3469241 (1.00x)
-Testing collisions (low 32-bit) - Expected 1401.3, actual 1390 (0.99x) (-11)
-Testing collisions (low 25-38 bits) - Worst is 38 bits: 26/21 (1.19x)
-Testing collisions (low 12-bit) - Expected 3465401.0, actual 3465401 (1.00x)
-Testing collisions (low 8-bit) - Expected 3469241.0, actual 3469241 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 52 - 0.070%
-
-Keyset 'Sparse' - 160-bit keys with up to 4 bits set - 26977161 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 84723.3, actual 84650 (1.00x) (-73)
-Testing collisions (high 28-44 bits) - Worst is 40 bits: 336/330 (1.02x)
-Testing collisions (high 12-bit) - Expected 26973065.0, actual 26973065 (1.00x)
-Testing collisions (high 8-bit) - Expected 26976905.0, actual 26976905 (1.00x)
-Testing collisions (low 32-bit) - Expected 84723.3, actual 84029 (0.99x) (-694)
-Testing collisions (low 28-44 bits) - Worst is 37 bits: 2744/2647 (1.04x)
-Testing collisions (low 12-bit) - Expected 26973065.0, actual 26973065 (1.00x)
-Testing collisions (low 8-bit) - Expected 26976905.0, actual 26976905 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 57 - 0.013%
-
-Keyset 'Sparse' - 256-bit keys with up to 3 bits set - 2796417 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 910.4, actual 903 (0.99x) (-7)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 29/28 (1.02x)
-Testing collisions (high 12-bit) - Expected 2792321.0, actual 2792321 (1.00x)
-Testing collisions (high 8-bit) - Expected 2796161.0, actual 2796161 (1.00x)
-Testing collisions (low 32-bit) - Expected 910.4, actual 855 (0.94x)
-Testing collisions (low 25-37 bits) - Worst is 28 bits: 14588/14565 (1.00x)
-Testing collisions (low 12-bit) - Expected 2792321.0, actual 2792321 (1.00x)
-Testing collisions (low 8-bit) - Expected 2796161.0, actual 2796161 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 7 - 0.112%
-
-Keyset 'Sparse' - 512-bit keys with up to 3 bits set - 22370049 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 58256.4, actual 58578 (1.01x) (322)
-Testing collisions (high 28-43 bits) - Worst is 43 bits: 32/28 (1.12x)
-Testing collisions (high 12-bit) - Expected 22365953.0, actual 22365953 (1.00x)
-Testing collisions (high 8-bit) - Expected 22369793.0, actual 22369793 (1.00x)
-Testing collisions (low 32-bit) - Expected 58256.4, actual 58543 (1.00x) (287)
-Testing collisions (low 28-43 bits) - Worst is 36 bits: 3712/3641 (1.02x)
-Testing collisions (low 12-bit) - Expected 22365953.0, actual 22365953 (1.00x)
-Testing collisions (low 8-bit) - Expected 22369793.0, actual 22369793 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 43 - 0.015%
-
-Keyset 'Sparse' - 1024-bit keys with up to 2 bits set - 524801 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 32.1, actual 35 (1.09x) (3)
-Testing collisions (high 22-32 bits) - Worst is 32 bits: 35/32 (1.09x)
-Testing collisions (high 12-bit) - Expected 520705.0, actual 520705 (1.00x)
-Testing collisions (high 8-bit) - Expected 524545.0, actual 524545 (1.00x)
-Testing collisions (low 32-bit) - Expected 32.1, actual 38 (1.19x) (6)
-Testing collisions (low 22-32 bits) - Worst is 32 bits: 38/32 (1.19x)
-Testing collisions (low 12-bit) - Expected 520705.0, actual 520705 (1.00x)
-Testing collisions (low 8-bit) - Expected 524545.0, actual 524545 (1.00x)
-Testing distribution - Worst bias is the 16-bit window at bit 17 - 0.142%
-
-Keyset 'Sparse' - 2048-bit keys with up to 2 bits set - 2098177 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.5, actual 488 (0.95x)
-Testing collisions (high 24-36 bits) - Worst is 30 bits: 2050/2050 (1.00x)
-Testing collisions (high 12-bit) - Expected 2094081.0, actual 2094081 (1.00x)
-Testing collisions (high 8-bit) - Expected 2097921.0, actual 2097921 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.5, actual 523 (1.02x) (11)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 147/128 (1.15x)
-Testing collisions (low 12-bit) - Expected 2094081.0, actual 2094081 (1.00x)
-Testing collisions (low 8-bit) - Expected 2097921.0, actual 2097921 (1.00x)
-Testing distribution - Worst bias is the 18-bit window at bit 57 - 0.080%
-
-
-[[[ Keyset 'Permutation' Tests ]]]
-
-Combination Lowbits Tests:
-Keyset 'Combination' - up to 7 blocks from a set of 8 - 2396744 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 668.7, actual 645 (0.96x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 94/83 (1.12x)
-Testing collisions (high 12-bit) - Expected 2392648.0, actual 2392648 (1.00x)
-Testing collisions (high 8-bit) - Expected 2396488.0, actual 2396488 (1.00x)
-Testing collisions (low 32-bit) - Expected 668.7, actual 693 (1.04x) (25)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 98/83 (1.17x)
-Testing collisions (low 12-bit) - Expected 2392648.0, actual 2392648 (1.00x)
-Testing collisions (low 8-bit) - Expected 2396488.0, actual 2396488 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 45 - 0.076%
-
-
-Combination Highbits Tests
-Keyset 'Combination' - up to 7 blocks from a set of 8 - 2396744 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 668.7, actual 682 (1.02x) (14)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 26/20 (1.24x)
-Testing collisions (high 12-bit) - Expected 2392648.0, actual 2392648 (1.00x)
-Testing collisions (high 8-bit) - Expected 2396488.0, actual 2396488 (1.00x)
-Testing collisions (low 32-bit) - Expected 668.7, actual 690 (1.03x) (22)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 47/41 (1.12x)
-Testing collisions (low 12-bit) - Expected 2392648.0, actual 2392648 (1.00x)
-Testing collisions (low 8-bit) - Expected 2396488.0, actual 2396488 (1.00x)
-Testing distribution - Worst bias is the 18-bit window at bit 13 - 0.059%
-
-
-Combination Hi-Lo Tests:
-Keyset 'Combination' - up to 6 blocks from a set of 15 - 12204240 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 17339.3, actual 17195 (0.99x) (-144)
-Testing collisions (high 27-41 bits) - Worst is 40 bits: 72/67 (1.06x)
-Testing collisions (high 12-bit) - Expected 12200144.0, actual 12200144 (1.00x)
-Testing collisions (high 8-bit) - Expected 12203984.0, actual 12203984 (1.00x)
-Testing collisions (low 32-bit) - Expected 17339.3, actual 17096 (0.99x) (-243)
-Testing collisions (low 27-41 bits) - Worst is 41 bits: 36/33 (1.06x)
-Testing collisions (low 12-bit) - Expected 12200144.0, actual 12200144 (1.00x)
-Testing collisions (low 8-bit) - Expected 12203984.0, actual 12203984 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 48 - 0.026%
-
-
-Combination 0x8000000 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8190 (1.00x) (-1)
-Testing collisions (high 26-40 bits) - Worst is 40 bits: 43/31 (1.34x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8149 (0.99x) (-42)
-Testing collisions (low 26-40 bits) - Worst is 37 bits: 272/255 (1.06x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 54 - 0.052%
-
-
-Combination 0x0000001 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8262 (1.01x) (71)
-Testing collisions (high 26-40 bits) - Worst is 39 bits: 71/63 (1.11x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8167 (1.00x) (-24)
-Testing collisions (low 26-40 bits) - Worst is 34 bits: 2066/2047 (1.01x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 2 - 0.049%
-
-
-Combination 0x800000000000000 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8224 (1.00x) (33)
-Testing collisions (high 26-40 bits) - Worst is 40 bits: 38/31 (1.19x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8182 (1.00x) (-9)
-Testing collisions (low 26-40 bits) - Worst is 30 bits: 32790/32767 (1.00x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 37 - 0.045%
-
-
-Combination 0x000000000000001 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8173 (1.00x) (-18)
-Testing collisions (high 26-40 bits) - Worst is 34 bits: 2054/2047 (1.00x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8313 (1.01x) (122)
-Testing collisions (low 26-40 bits) - Worst is 40 bits: 37/31 (1.16x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 20 - 0.037%
-
-
-Combination 16-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8316 (1.02x) (125)
-Testing collisions (high 26-40 bits) - Worst is 36 bits: 545/511 (1.06x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8278 (1.01x) (87)
-Testing collisions (low 26-40 bits) - Worst is 40 bits: 36/31 (1.13x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 22 - 0.041%
-
-
-Combination 16-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8106 (0.99x) (-85)
-Testing collisions (high 26-40 bits) - Worst is 38 bits: 142/127 (1.11x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8250 (1.01x) (59)
-Testing collisions (low 26-40 bits) - Worst is 39 bits: 75/63 (1.17x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 28 - 0.039%
-
-
-Combination 32-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8337 (1.02x) (146)
-Testing collisions (high 26-40 bits) - Worst is 40 bits: 35/31 (1.09x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8248 (1.01x) (57)
-Testing collisions (low 26-40 bits) - Worst is 40 bits: 37/31 (1.16x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 25 - 0.038%
-
-
-Combination 32-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8227 (1.00x) (36)
-Testing collisions (high 26-40 bits) - Worst is 35 bits: 1047/1023 (1.02x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8191 (1.00x)
-Testing collisions (low 26-40 bits) - Worst is 39 bits: 73/63 (1.14x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 35 - 0.043%
-
-
-Combination 64-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8221 (1.00x) (30)
-Testing collisions (high 26-40 bits) - Worst is 39 bits: 73/63 (1.14x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8060 (0.98x) (-131)
-Testing collisions (low 26-40 bits) - Worst is 29 bits: 65173/65535 (0.99x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 8 - 0.060%
-
-
-Combination 64-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8254 (1.01x) (63)
-Testing collisions (high 26-40 bits) - Worst is 38 bits: 137/127 (1.07x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8101 (0.99x) (-90)
-Testing collisions (low 26-40 bits) - Worst is 37 bits: 260/255 (1.02x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 41 - 0.040%
-
-
-Combination 128-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8141 (0.99x) (-50)
-Testing collisions (high 26-40 bits) - Worst is 40 bits: 33/31 (1.03x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8340 (1.02x) (149)
-Testing collisions (low 26-40 bits) - Worst is 40 bits: 38/31 (1.19x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 39 - 0.062%
-
-
-Combination 128-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 8192.0, actual 8309 (1.01x) (118)
-Testing collisions (high 26-40 bits) - Worst is 37 bits: 275/255 (1.07x)
-Testing collisions (high 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (high 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing collisions (low 32-bit) - Expected 8192.0, actual 8176 (1.00x) (-15)
-Testing collisions (low 26-40 bits) - Worst is 36 bits: 561/511 (1.10x)
-Testing collisions (low 12-bit) - Expected 8384510.0, actual 8384510 (1.00x)
-Testing collisions (low 8-bit) - Expected 8388350.0, actual 8388350 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 17 - 0.032%
-
-
-[[[ Keyset 'Window' Tests ]]]
-
-Keyset 'Window' - 32-bit key, 25-bit window - 32 tests, 33554432 keys per test
-Window at 0 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 1 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 2 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 3 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 4 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 5 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 6 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 7 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 8 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 9 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 10 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 11 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 12 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 13 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 14 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 15 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 16 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 17 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 18 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 19 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 20 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 21 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 22 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 23 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 24 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 25 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 26 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 27 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 28 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 29 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 30 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 31 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 32 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-
-[[[ Keyset 'Cyclic' Tests ]]]
-
-Keyset 'Cyclic' - 8 cycles of 8 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116.4, actual 119 (1.02x) (3)
-Testing collisions (high 23-34 bits) - Worst is 32 bits: 119/116 (1.02x)
-Testing collisions (high 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 116.4, actual 118 (1.01x) (2)
-Testing collisions (low 23-34 bits) - Worst is 30 bits: 476/465 (1.02x)
-Testing collisions (low 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 44 - 0.134%
-
-Keyset 'Cyclic' - 8 cycles of 9 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116.4, actual 127 (1.09x) (11)
-Testing collisions (high 23-34 bits) - Worst is 31 bits: 262/232 (1.13x)
-Testing collisions (high 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 116.4, actual 112 (0.96x)
-Testing collisions (low 23-34 bits) - Worst is 34 bits: 33/29 (1.13x)
-Testing collisions (low 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 32 - 0.141%
-
-Keyset 'Cyclic' - 8 cycles of 10 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116.4, actual 131 (1.13x) (15)
-Testing collisions (high 23-34 bits) - Worst is 34 bits: 33/29 (1.13x)
-Testing collisions (high 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 116.4, actual 109 (0.94x)
-Testing collisions (low 23-34 bits) - Worst is 34 bits: 37/29 (1.27x)
-Testing collisions (low 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 16 - 0.122%
-
-Keyset 'Cyclic' - 8 cycles of 11 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116.4, actual 104 (0.89x)
-Testing collisions (high 23-34 bits) - Worst is 34 bits: 31/29 (1.07x)
-Testing collisions (high 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 116.4, actual 124 (1.07x) (8)
-Testing collisions (low 23-34 bits) - Worst is 34 bits: 34/29 (1.17x)
-Testing collisions (low 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 47 - 0.137%
-
-Keyset 'Cyclic' - 8 cycles of 12 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116.4, actual 113 (0.97x)
-Testing collisions (high 23-34 bits) - Worst is 28 bits: 1877/1862 (1.01x)
-Testing collisions (high 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 116.4, actual 113 (0.97x)
-Testing collisions (low 23-34 bits) - Worst is 34 bits: 38/29 (1.31x)
-Testing collisions (low 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 53 - 0.109%
-
-Keyset 'Cyclic' - 8 cycles of 16 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116.4, actual 122 (1.05x) (6)
-Testing collisions (high 23-34 bits) - Worst is 34 bits: 31/29 (1.07x)
-Testing collisions (high 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 116.4, actual 112 (0.96x)
-Testing collisions (low 23-34 bits) - Worst is 33 bits: 62/58 (1.07x)
-Testing collisions (low 12-bit) - Expected 995904.0, actual 995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 999744.0, actual 999744 (1.00x)
-Testing distribution - Worst bias is the 17-bit window at bit 37 - 0.086%
-
-
-[[[ Keyset 'TwoBytes' Tests ]]]
-
-Keyset 'TwoBytes' - up-to-4-byte keys, 652545 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 49.6, actual 61 (1.23x) (12)
-Testing collisions (high 23-33 bits) - Worst is 33 bits: 31/24 (1.25x)
-Testing collisions (high 12-bit) - Expected 648449.0, actual 648449 (1.00x)
-Testing collisions (high 8-bit) - Expected 652289.0, actual 652289 (1.00x)
-Testing collisions (low 32-bit) - Expected 49.6, actual 53 (1.07x) (4)
-Testing collisions (low 23-33 bits) - Worst is 32 bits: 53/49 (1.07x)
-Testing collisions (low 12-bit) - Expected 648449.0, actual 648449 (1.00x)
-Testing collisions (low 8-bit) - Expected 652289.0, actual 652289 (1.00x)
-Testing distribution - Worst bias is the 15-bit window at bit 54 - 0.125%
-
-Keyset 'TwoBytes' - up-to-8-byte keys, 5471025 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 3484.6, actual 3456 (0.99x) (-28)
-Testing collisions (high 26-39 bits) - Worst is 34 bits: 878/871 (1.01x)
-Testing collisions (high 12-bit) - Expected 5466929.0, actual 5466929 (1.00x)
-Testing collisions (high 8-bit) - Expected 5470769.0, actual 5470769 (1.00x)
-Testing collisions (low 32-bit) - Expected 3484.6, actual 3430 (0.98x) (-54)
-Testing collisions (low 26-39 bits) - Worst is 35 bits: 441/435 (1.01x)
-Testing collisions (low 12-bit) - Expected 5466929.0, actual 5466929 (1.00x)
-Testing collisions (low 8-bit) - Expected 5470769.0, actual 5470769 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 30 - 0.072%
-
-Keyset 'TwoBytes' - up-to-12-byte keys, 18616785 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 40347.8, actual 40130 (0.99x) (-217)
-Testing collisions (high 27-42 bits) - Worst is 32 bits: 40130/40347 (0.99x)
-Testing collisions (high 12-bit) - Expected 18612689.0, actual 18612689 (1.00x)
-Testing collisions (high 8-bit) - Expected 18616529.0, actual 18616529 (1.00x)
-Testing collisions (low 32-bit) - Expected 40347.8, actual 40032 (0.99x) (-315)
-Testing collisions (low 27-42 bits) - Worst is 42 bits: 46/39 (1.17x)
-Testing collisions (low 12-bit) - Expected 18612689.0, actual 18612689 (1.00x)
-Testing collisions (low 8-bit) - Expected 18616529.0, actual 18616529 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 40 - 0.023%
-
-Keyset 'TwoBytes' - up-to-16-byte keys, 44251425 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 227963.2, actual 226681 (0.99x) (-1282)
-Testing collisions (high 29-45 bits) - Worst is 45 bits: 31/27 (1.11x)
-Testing collisions (high 12-bit) - Expected 44247329.0, actual 44247329 (1.00x)
-Testing collisions (high 8-bit) - Expected 44251169.0, actual 44251169 (1.00x)
-Testing collisions (low 32-bit) - Expected 227963.2, actual 227005 (1.00x) (-958)
-Testing collisions (low 29-45 bits) - Worst is 43 bits: 130/111 (1.17x)
-Testing collisions (low 12-bit) - Expected 44247329.0, actual 44247329 (1.00x)
-Testing collisions (low 8-bit) - Expected 44251169.0, actual 44251169 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 44 - 0.009%
-
-Keyset 'TwoBytes' - up-to-20-byte keys, 86536545 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 871784.7, actual 865470 (0.99x) (-6314)
-Testing collisions (high 30-47 bits) - Worst is 41 bits: 1794/1702 (1.05x)
-Testing collisions (high 12-bit) - Expected 86532449.0, actual 86532449 (1.00x)
-Testing collisions (high 8-bit) - Expected 86536289.0, actual 86536289 (1.00x)
-Testing collisions (low 32-bit) - Expected 871784.7, actual 867660 (1.00x) (-4124)
-Testing collisions (low 30-47 bits) - Worst is 43 bits: 452/425 (1.06x)
-Testing collisions (low 12-bit) - Expected 86532449.0, actual 86532449 (1.00x)
-Testing collisions (low 8-bit) - Expected 86536289.0, actual 86536289 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 46 - 0.004%
-
-
-[[[ Keyset 'Text' Tests ]]]
-
-Keyset 'Text' - keys of form "FooXXXXBar" - 14776336 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 25418.1, actual 25256 (0.99x) (-162)
-Testing collisions (high 27-42 bits) - Worst is 42 bits: 30/24 (1.21x)
-Testing collisions (high 12-bit) - Expected 14772240.0, actual 14772240 (1.00x)
-Testing collisions (high 8-bit) - Expected 14776080.0, actual 14776080 (1.00x)
-Testing collisions (low 32-bit) - Expected 25418.1, actual 25375 (1.00x) (-43)
-Testing collisions (low 27-42 bits) - Worst is 40 bits: 112/99 (1.13x)
-Testing collisions (low 12-bit) - Expected 14772240.0, actual 14772240 (1.00x)
-Testing collisions (low 8-bit) - Expected 14776080.0, actual 14776080 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 61 - 0.024%
-
-Keyset 'Text' - keys of form "FooBarXXXX" - 14776336 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 25418.1, actual 25878 (1.02x) (460)
-Testing collisions (high 27-42 bits) - Worst is 33 bits: 12976/12709 (1.02x)
-Testing collisions (high 12-bit) - Expected 14772240.0, actual 14772240 (1.00x)
-Testing collisions (high 8-bit) - Expected 14776080.0, actual 14776080 (1.00x)
-Testing collisions (low 32-bit) - Expected 25418.1, actual 25540 (1.00x) (122)
-Testing collisions (low 27-42 bits) - Worst is 38 bits: 416/397 (1.05x)
-Testing collisions (low 12-bit) - Expected 14772240.0, actual 14772240 (1.00x)
-Testing collisions (low 8-bit) - Expected 14776080.0, actual 14776080 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 27 - 0.023%
-
-Keyset 'Text' - keys of form "XXXXFooBar" - 14776336 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 25418.1, actual 25266 (0.99x) (-152)
-Testing collisions (high 27-42 bits) - Worst is 34 bits: 6369/6354 (1.00x)
-Testing collisions (high 12-bit) - Expected 14772240.0, actual 14772240 (1.00x)
-Testing collisions (high 8-bit) - Expected 14776080.0, actual 14776080 (1.00x)
-Testing collisions (low 32-bit) - Expected 25418.1, actual 25162 (0.99x) (-256)
-Testing collisions (low 27-42 bits) - Worst is 40 bits: 101/99 (1.02x)
-Testing collisions (low 12-bit) - Expected 14772240.0, actual 14772240 (1.00x)
-Testing collisions (low 8-bit) - Expected 14776080.0, actual 14776080 (1.00x)
-Testing distribution - Worst bias is the 20-bit window at bit 10 - 0.016%
-
-Keyset 'Words' - 4000000 random keys of len 6-16 from alnum charset
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1862.6, actual 1923 (1.03x) (61)
-Testing collisions (high 25-38 bits) - Worst is 37 bits: 65/58 (1.12x)
-Testing collisions (high 12-bit) - Expected 3995904.0, actual 3995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 3999744.0, actual 3999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 1862.6, actual 1876 (1.01x) (14)
-Testing collisions (low 25-38 bits) - Worst is 32 bits: 1876/1862 (1.01x)
-Testing collisions (low 12-bit) - Expected 3995904.0, actual 3995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 3999744.0, actual 3999744 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 1 - 0.075%
-
-Keyset 'Words' - 4000000 random keys of len 6-16 from password charset
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1862.6, actual 1884 (1.01x) (22)
-Testing collisions (high 25-38 bits) - Worst is 35 bits: 253/232 (1.09x)
-Testing collisions (high 12-bit) - Expected 3995904.0, actual 3995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 3999744.0, actual 3999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 1862.6, actual 1858 (1.00x) (-4)
-Testing collisions (low 25-38 bits) - Worst is 36 bits: 140/116 (1.20x)
-Testing collisions (low 12-bit) - Expected 3995904.0, actual 3995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 3999744.0, actual 3999744 (1.00x)
-Testing distribution - Worst bias is the 18-bit window at bit 47 - 0.053%
-
-Keyset 'Words' - 102401 dict words
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1.2, actual 1 (0.82x)
-Testing collisions (high 20-27 bits) - Worst is 24 bits: 333/312 (1.07x)
-Testing collisions (high 12-bit) - Expected 98305.0, actual 98305 (1.00x)
-Testing collisions (high 8-bit) - Expected 102145.0, actual 102145 (1.00x)
-Testing collisions (low 32-bit) - Expected 1.2, actual 1 (0.82x)
-Testing collisions (low 20-27 bits) - Worst is 22 bits: 1284/1250 (1.03x)
-Testing collisions (low 12-bit) - Expected 98305.0, actual 98305 (1.00x)
-Testing collisions (low 8-bit) - Expected 102145.0, actual 102145 (1.00x)
-Testing distribution - Worst bias is the 14-bit window at bit 28 - 0.409%
-
-
-[[[ Keyset 'Zeroes' Tests ]]]
-
-Keyset 'Zeroes' - 204800 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 4.9, actual 6 (1.23x) (2)
-Testing collisions (high 21-29 bits) - Worst is 28 bits: 82/78 (1.05x)
-Testing collisions (high 12-bit) - Expected 200704.0, actual 200704 (1.00x)
-Testing collisions (high 8-bit) - Expected 204544.0, actual 204544 (1.00x)
-Testing collisions (low 32-bit) - Expected 4.9, actual 5 (1.02x) (1)
-Testing collisions (low 21-29 bits) - Worst is 29 bits: 40/39 (1.02x)
-Testing collisions (low 12-bit) - Expected 200704.0, actual 200704 (1.00x)
-Testing collisions (low 8-bit) - Expected 204544.0, actual 204544 (1.00x)
-Testing distribution - Worst bias is the 14-bit window at bit 50 - 0.267%
-
-
-[[[ Keyset 'Seed' Tests ]]]
-
-Keyset 'Seed' - 5000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 2910.4, actual 2988 (1.03x) (78)
-Testing collisions (high 26-39 bits) - Worst is 39 bits: 27/22 (1.19x)
-Testing collisions (high 12-bit) - Expected 4995904.0, actual 4995904 (1.00x)
-Testing collisions (high 8-bit) - Expected 4999744.0, actual 4999744 (1.00x)
-Testing collisions (low 32-bit) - Expected 2910.4, actual 3040 (1.04x) (130)
-Testing collisions (low 26-39 bits) - Worst is 33 bits: 1528/1455 (1.05x)
-Testing collisions (low 12-bit) - Expected 4995904.0, actual 4995904 (1.00x)
-Testing collisions (low 8-bit) - Expected 4999744.0, actual 4999744 (1.00x)
-Testing distribution - Worst bias is the 19-bit window at bit 8 - 0.045%
-
-
-[[[ Keyset 'PerlinNoise' Tests ]]]
-
-Testing 16777216 coordinates (L2) :
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 32768.0, actual 32864 (1.00x) (97)
-Testing collisions (high 27-42 bits) - Worst is 38 bits: 548/511 (1.07x)
-Testing collisions (high 12-bit) - Expected 16773120.0, actual 16773120 (1.00x)
-Testing collisions (high 8-bit) - Expected 16776960.0, actual 16776960 (1.00x)
-Testing collisions (low 32-bit) - Expected 32768.0, actual 32219 (0.98x) (-548)
-Testing collisions (low 27-42 bits) - Worst is 42 bits: 44/31 (1.38x)
-Testing collisions (low 12-bit) - Expected 16773120.0, actual 16773120 (1.00x)
-Testing collisions (low 8-bit) - Expected 16776960.0, actual 16776960 (1.00x)
-
-
-[[[ Diff 'Differential' Tests ]]]
-
-Testing 8303632 up-to-5-bit differentials in 64-bit keys -> 64 bit hashes.
-1000 reps, 8303632000 total tests, expecting 0.00 random collisions..........
-0 total collisions, of which 0 single collisions were ignored
-
-Testing 11017632 up-to-4-bit differentials in 128-bit keys -> 64 bit hashes.
-1000 reps, 11017632000 total tests, expecting 0.00 random collisions..........
-0 total collisions, of which 0 single collisions were ignored
-
-Testing 2796416 up-to-3-bit differentials in 256-bit keys -> 64 bit hashes.
-1000 reps, 2796416000 total tests, expecting 0.00 random collisions..........
-0 total collisions, of which 0 single collisions were ignored
-
-
-[[[ DiffDist 'Differential Distribution' Tests ]]]
-
-Testing bit 0
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 503 (0.98x) (-8)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 37/31 (1.16x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 499 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 31 bits: 1028/1023 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 1
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 550 (1.07x) (39)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 147/127 (1.15x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 504 (0.98x) (-7)
-Testing collisions (low 24-36 bits) - Worst is 26 bits: 32606/32767 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 2
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 490 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 67/63 (1.05x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 522 (1.02x) (11)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 37/31 (1.16x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 3
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 483 (0.94x)
-Testing collisions (high 24-36 bits) - Worst is 28 bits: 8201/8191 (1.00x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 519 (1.01x) (8)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 86/63 (1.34x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 4
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 476 (0.93x)
-Testing collisions (high 24-36 bits) - Worst is 30 bits: 2026/2047 (0.99x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 511 (1.00x)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 145/127 (1.13x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 5
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 497 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 29 bits: 4206/4095 (1.03x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 488 (0.95x)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 141/127 (1.10x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 6
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 506 (0.99x) (-5)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 137/127 (1.07x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 512 (1.00x) (1)
-Testing collisions (low 24-36 bits) - Worst is 28 bits: 8292/8191 (1.01x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 7
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 481 (0.94x)
-Testing collisions (high 24-36 bits) - Worst is 30 bits: 2011/2047 (0.98x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 551 (1.08x) (40)
-Testing collisions (low 24-36 bits) - Worst is 32 bits: 551/511 (1.08x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 8
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 550 (1.07x) (39)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 47/31 (1.47x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 499 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 139/127 (1.09x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 9
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 493 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 66/63 (1.03x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 537 (1.05x) (26)
-Testing collisions (low 24-36 bits) - Worst is 33 bits: 299/255 (1.17x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 10
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 555 (1.08x) (44)
-Testing collisions (high 24-36 bits) - Worst is 33 bits: 281/255 (1.10x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 495 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 31 bits: 1048/1023 (1.02x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 11
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 459 (0.90x)
-Testing collisions (high 24-36 bits) - Worst is 29 bits: 4100/4095 (1.00x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 488 (0.95x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 42/31 (1.31x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 12
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 491 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 29 bits: 4167/4095 (1.02x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 480 (0.94x)
-Testing collisions (low 24-36 bits) - Worst is 30 bits: 2089/2047 (1.02x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 13
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 497 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 132/127 (1.03x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 553 (1.08x) (42)
-Testing collisions (low 24-36 bits) - Worst is 32 bits: 553/511 (1.08x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 14
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 538 (1.05x) (27)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 34/31 (1.06x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 508 (0.99x) (-3)
-Testing collisions (low 24-36 bits) - Worst is 33 bits: 271/255 (1.06x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 15
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 534 (1.04x) (23)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 36/31 (1.13x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 530 (1.04x) (19)
-Testing collisions (low 24-36 bits) - Worst is 33 bits: 267/255 (1.04x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 16
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 481 (0.94x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 33/31 (1.03x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 498 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 29 bits: 4135/4095 (1.01x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 17
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 526 (1.03x) (15)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 80/63 (1.25x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 477 (0.93x)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 64/63 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 18
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 483 (0.94x)
-Testing collisions (high 24-36 bits) - Worst is 28 bits: 8326/8191 (1.02x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 490 (0.96x)
-Testing collisions (low 24-36 bits) - Worst is 29 bits: 4095/4095 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 19
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 492 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 136/127 (1.06x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 529 (1.03x) (18)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 79/63 (1.23x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 20
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 494 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 67/63 (1.05x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 511 (1.00x)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 137/127 (1.07x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 21
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 494 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 45/31 (1.41x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 523 (1.02x) (12)
-Testing collisions (low 24-36 bits) - Worst is 30 bits: 2124/2047 (1.04x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 22
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 497 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 129/127 (1.01x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 499 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 33 bits: 258/255 (1.01x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 23
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 520 (1.02x) (9)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 37/31 (1.16x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 515 (1.01x) (4)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 39/31 (1.22x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 24
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 496 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 37/31 (1.16x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 486 (0.95x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 36/31 (1.13x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 25
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 515 (1.01x) (4)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 35/31 (1.09x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 511 (1.00x)
-Testing collisions (low 24-36 bits) - Worst is 28 bits: 8241/8191 (1.01x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 26
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 525 (1.03x) (14)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 88/63 (1.38x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 500 (0.98x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 43/31 (1.34x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 27
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 496 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 70/63 (1.09x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 516 (1.01x) (5)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 38/31 (1.19x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 28
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 523 (1.02x) (12)
-Testing collisions (high 24-36 bits) - Worst is 32 bits: 523/511 (1.02x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 512 (1.00x) (1)
-Testing collisions (low 24-36 bits) - Worst is 30 bits: 2100/2047 (1.03x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 29
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 534 (1.04x) (23)
-Testing collisions (high 24-36 bits) - Worst is 32 bits: 534/511 (1.04x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 494 (0.96x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 34/31 (1.06x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 30
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 505 (0.99x) (-6)
-Testing collisions (high 24-36 bits) - Worst is 29 bits: 4057/4095 (0.99x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 499 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 68/63 (1.06x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 31
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 526 (1.03x) (15)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 36/31 (1.13x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 517 (1.01x) (6)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 40/31 (1.25x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 32
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 467 (0.91x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 41/31 (1.28x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 512 (1.00x) (1)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 142/127 (1.11x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 33
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 518 (1.01x) (7)
-Testing collisions (high 24-36 bits) - Worst is 33 bits: 267/255 (1.04x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 518 (1.01x) (7)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 40/31 (1.25x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 34
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 540 (1.05x) (29)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 49/31 (1.53x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 556 (1.09x) (45)
-Testing collisions (low 24-36 bits) - Worst is 32 bits: 556/511 (1.09x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 35
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 486 (0.95x)
-Testing collisions (high 24-36 bits) - Worst is 30 bits: 2057/2047 (1.00x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 504 (0.98x) (-7)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 33/31 (1.03x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 36
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 514 (1.00x) (3)
-Testing collisions (high 24-36 bits) - Worst is 31 bits: 1035/1023 (1.01x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 462 (0.90x)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 64/63 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 37
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 496 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 65/63 (1.02x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 506 (0.99x) (-5)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 73/63 (1.14x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 38
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 489 (0.96x)
-Testing collisions (high 24-36 bits) - Worst is 30 bits: 2065/2047 (1.01x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 490 (0.96x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 39/31 (1.22x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 39
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 539 (1.05x) (28)
-Testing collisions (high 24-36 bits) - Worst is 33 bits: 271/255 (1.06x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 514 (1.00x) (3)
-Testing collisions (low 24-36 bits) - Worst is 32 bits: 514/511 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 40
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 484 (0.95x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 36/31 (1.13x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 515 (1.01x) (4)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 37/31 (1.16x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 41
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 505 (0.99x) (-6)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 137/127 (1.07x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 520 (1.02x) (9)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 67/63 (1.05x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 42
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 506 (0.99x) (-5)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 90/63 (1.41x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 566 (1.11x) (55)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 39/31 (1.22x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 43
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 541 (1.06x) (30)
-Testing collisions (high 24-36 bits) - Worst is 32 bits: 541/511 (1.06x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 480 (0.94x)
-Testing collisions (low 24-36 bits) - Worst is 27 bits: 16264/16383 (0.99x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 44
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 474 (0.93x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 38/31 (1.19x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 496 (0.97x)
-Testing collisions (low 24-36 bits) - Worst is 30 bits: 2097/2047 (1.02x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 45
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 497 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 65/63 (1.02x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 557 (1.09x) (46)
-Testing collisions (low 24-36 bits) - Worst is 32 bits: 557/511 (1.09x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 46
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 514 (1.00x) (3)
-Testing collisions (high 24-36 bits) - Worst is 32 bits: 514/511 (1.00x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 540 (1.05x) (29)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 43/31 (1.34x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 47
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 520 (1.02x) (9)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 39/31 (1.22x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 540 (1.05x) (29)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 81/63 (1.27x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 48
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 533 (1.04x) (22)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 75/63 (1.17x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 513 (1.00x) (2)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 40/31 (1.25x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 49
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 522 (1.02x) (11)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 37/31 (1.16x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 491 (0.96x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 40/31 (1.25x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 50
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 527 (1.03x) (16)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 35/31 (1.09x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 545 (1.06x) (34)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 168/127 (1.31x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 51
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 505 (0.99x) (-6)
-Testing collisions (high 24-36 bits) - Worst is 33 bits: 280/255 (1.09x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 492 (0.96x)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 74/63 (1.16x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 52
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 468 (0.91x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 36/31 (1.13x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 509 (0.99x) (-2)
-Testing collisions (low 24-36 bits) - Worst is 31 bits: 1028/1023 (1.00x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 53
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 495 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 28 bits: 8270/8191 (1.01x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 486 (0.95x)
-Testing collisions (low 24-36 bits) - Worst is 29 bits: 4190/4095 (1.02x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 54
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 513 (1.00x) (2)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 77/63 (1.20x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 477 (0.93x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 39/31 (1.22x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 55
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 509 (0.99x) (-2)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 71/63 (1.11x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 527 (1.03x) (16)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 34/31 (1.06x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 56
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 487 (0.95x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 39/31 (1.22x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 485 (0.95x)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 41/31 (1.28x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 57
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 485 (0.95x)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 41/31 (1.28x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 545 (1.06x) (34)
-Testing collisions (low 24-36 bits) - Worst is 35 bits: 73/63 (1.14x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 58
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 509 (0.99x) (-2)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 135/127 (1.05x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 511 (1.00x)
-Testing collisions (low 24-36 bits) - Worst is 30 bits: 2106/2047 (1.03x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 59
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 509 (0.99x) (-2)
-Testing collisions (high 24-36 bits) - Worst is 31 bits: 1032/1023 (1.01x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 505 (0.99x) (-6)
-Testing collisions (low 24-36 bits) - Worst is 29 bits: 4237/4095 (1.03x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 60
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 499 (0.97x)
-Testing collisions (high 24-36 bits) - Worst is 28 bits: 8290/8191 (1.01x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 526 (1.03x) (15)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 41/31 (1.28x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 61
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 534 (1.04x) (23)
-Testing collisions (high 24-36 bits) - Worst is 34 bits: 134/127 (1.05x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 508 (0.99x) (-3)
-Testing collisions (low 24-36 bits) - Worst is 31 bits: 1035/1023 (1.01x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 62
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 530 (1.04x) (19)
-Testing collisions (high 24-36 bits) - Worst is 32 bits: 530/511 (1.04x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 517 (1.01x) (6)
-Testing collisions (low 24-36 bits) - Worst is 36 bits: 42/31 (1.31x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-Testing bit 63
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 512.0, actual 521 (1.02x) (10)
-Testing collisions (high 24-36 bits) - Worst is 36 bits: 43/31 (1.34x)
-Testing collisions (high 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (high 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-Testing collisions (low 32-bit) - Expected 512.0, actual 472 (0.92x)
-Testing collisions (low 24-36 bits) - Worst is 28 bits: 8141/8191 (0.99x)
-Testing collisions (low 12-bit) - Expected 2093056.0, actual 2093056 (1.00x)
-Testing collisions (low 8-bit) - Expected 2096896.0, actual 2096896 (1.00x)
-
-
-[[[ MomentChi2 Tests ]]]
-
-Analyze hashes produced from a serie of linearly increasing numbers of 32-bit, using a step of 3 ...
-Target values to approximate : 38918200.000000 - 410450.000000
-Popcount 1 stats : 38919121.989370 - 410434.062934
-Popcount 0 stats : 38918028.259881 - 410423.768513
-MomentChi2 for bits 1 : 1.03555
-MomentChi2 for bits 0 : 0.0359308
-
-Derivative stats (transition from 2 consecutive values) :
-Popcount 1 stats : 38919523.956012 - 410475.202934
-Popcount 0 stats : 38918557.696824 - 410478.877341
-MomentChi2 for deriv b1 : 2.13522
-MomentChi2 for deriv b0 : 0.155856
-
- Great !!
-
-
-[[[ Prng Tests ]]]
-
-Generating 33554432 random numbers :
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 131072.0, actual 130471 (1.00x) (-600)
-Testing collisions (high 28-44 bits) - Worst is 42 bits: 130/127 (1.02x)
-Testing collisions (high 12-bit) - Expected 33550336.0, actual 33550336 (1.00x)
-Testing collisions (high 8-bit) - Expected 33554176.0, actual 33554176 (1.00x)
-Testing collisions (low 32-bit) - Expected 131072.0, actual 130871 (1.00x) (-200)
-Testing collisions (low 28-44 bits) - Worst is 43 bits: 70/63 (1.09x)
-Testing collisions (low 12-bit) - Expected 33550336.0, actual 33550336 (1.00x)
-Testing collisions (low 8-bit) - Expected 33554176.0, actual 33554176 (1.00x)
-
-
-Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001
-Verification value is 0x00000001 - Testing took 584.720469 seconds
--------------------------------------------------------------------------------
diff --git a/smhasher/clone_smhasher.sh b/smhasher/clone_smhasher.sh
deleted file mode 100755
index e3290d2..0000000
--- a/smhasher/clone_smhasher.sh
+++ /dev/null
@@ -1 +0,0 @@
-git clone https://github.com/rurban/smhasher.git && cd smhasher && git apply ../0001-Add-support-for-aHash.patch
diff --git a/smhasher/fallbackOutput.txt b/smhasher/fallbackOutput.txt
deleted file mode 100644
index cb324c5..0000000
--- a/smhasher/fallbackOutput.txt
+++ /dev/null
@@ -1,1467 +0,0 @@
--------------------------------------------------------------------------------
---- Testing ahash64 "ahash 64bit" GOOD
-
-[[[ Sanity Tests ]]]
-
-Verification value 0x52EC0BA4 ....... SKIP (self- or unseeded)
-Running sanity check 1 .......... PASS
-Running AppendedZeroesTest .......... PASS
-
-[[[ Speed Tests ]]]
-
-Bulk speed test - 262144-byte keys
-Alignment 7 - 8.506 bytes/cycle - 24336.28 MiB/sec @ 3 ghz
-Alignment 6 - 8.505 bytes/cycle - 24333.38 MiB/sec @ 3 ghz
-Alignment 5 - 8.500 bytes/cycle - 24317.30 MiB/sec @ 3 ghz
-Alignment 4 - 8.491 bytes/cycle - 24294.09 MiB/sec @ 3 ghz
-Alignment 3 - 8.491 bytes/cycle - 24293.90 MiB/sec @ 3 ghz
-Alignment 2 - 8.492 bytes/cycle - 24296.22 MiB/sec @ 3 ghz
-Alignment 1 - 8.508 bytes/cycle - 24340.25 MiB/sec @ 3 ghz
-Alignment 0 - 8.748 bytes/cycle - 25028.73 MiB/sec @ 3 ghz
-Average - 8.530 bytes/cycle - 24405.02 MiB/sec @ 3 ghz
-
-Small key speed test - 1-byte keys - 14.97 cycles/hash
-Small key speed test - 2-byte keys - 15.00 cycles/hash
-Small key speed test - 3-byte keys - 15.00 cycles/hash
-Small key speed test - 4-byte keys - 15.00 cycles/hash
-Small key speed test - 5-byte keys - 16.00 cycles/hash
-Small key speed test - 6-byte keys - 16.00 cycles/hash
-Small key speed test - 7-byte keys - 16.11 cycles/hash
-Small key speed test - 8-byte keys - 15.00 cycles/hash
-Small key speed test - 9-byte keys - 19.04 cycles/hash
-Small key speed test - 10-byte keys - 19.70 cycles/hash
-Small key speed test - 11-byte keys - 19.43 cycles/hash
-Small key speed test - 12-byte keys - 19.54 cycles/hash
-Small key speed test - 13-byte keys - 19.65 cycles/hash
-Small key speed test - 14-byte keys - 19.45 cycles/hash
-Small key speed test - 15-byte keys - 19.00 cycles/hash
-Small key speed test - 16-byte keys - 19.45 cycles/hash
-Small key speed test - 17-byte keys - 19.84 cycles/hash
-Small key speed test - 18-byte keys - 19.65 cycles/hash
-Small key speed test - 19-byte keys - 19.36 cycles/hash
-Small key speed test - 20-byte keys - 19.74 cycles/hash
-Small key speed test - 21-byte keys - 19.56 cycles/hash
-Small key speed test - 22-byte keys - 20.11 cycles/hash
-Small key speed test - 23-byte keys - 20.08 cycles/hash
-Small key speed test - 24-byte keys - 20.29 cycles/hash
-Small key speed test - 25-byte keys - 20.55 cycles/hash
-Small key speed test - 26-byte keys - 20.42 cycles/hash
-Small key speed test - 27-byte keys - 20.43 cycles/hash
-Small key speed test - 28-byte keys - 20.37 cycles/hash
-Small key speed test - 29-byte keys - 20.42 cycles/hash
-Small key speed test - 30-byte keys - 20.42 cycles/hash
-Small key speed test - 31-byte keys - 20.37 cycles/hash
-Average 18.708 cycles/hash
-
-[[[ 'Hashmap' Speed Tests ]]]
-
-std::unordered_map
-Init std HashMapTest: 295.723 cycles/op (102401 inserts, 1% deletions)
-Running std HashMapTest: 124.234 cycles/op (1.7 stdv)
-
-greg7mdp/parallel-hashmap
-Init fast HashMapTest: 112.031 cycles/op (102401 inserts, 1% deletions)
-Running fast HashMapTest: 85.002 cycles/op (2.1 stdv) ....... PASS
-
-[[[ Avalanche Tests ]]]
-
-Testing 24-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.700000%
-Testing 32-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.628000%
-Testing 40-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.628667%
-Testing 48-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.662000%
-Testing 56-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.699333%
-Testing 64-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.665333%
-Testing 72-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.630667%
-Testing 80-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.692000%
-Testing 96-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.774000%
-Testing 112-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.730667%
-Testing 128-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.794000%
-Testing 160-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.702000%
-Testing 512-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.763333%
-Testing 1024-bit keys -> 64-bit hashes, 300000 reps worst bias is 0.816667%
-
-[[[ Keyset 'Sparse' Tests ]]]
-
-Keyset 'Sparse' - 16-bit keys with up to 9 bits set - 50643 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 0.6, actual 0 (0.00x)
-Testing collisions (high 19-26 bits) - Worst is 22 bits: 320/611 (0.52x)
-Testing collisions (high 12-bit) - Expected 50643.0, actual 46547 (0.92x)
-Testing collisions (high 8-bit) - Expected 50643.0, actual 50387 (0.99x) (-256)
-Testing collisions (low 32-bit) - Expected 0.6, actual 1 (1.67x) (1)
-Testing collisions (low 19-26 bits) - Worst is 20 bits: 1168/2445 (0.48x)
-Testing collisions (low 12-bit) - Expected 50643.0, actual 46547 (0.92x)
-Testing collisions (low 8-bit) - Expected 50643.0, actual 50387 (0.99x) (-256)
-Testing distribution - Worst bias is the 13-bit window at bit 4 - 0.462%
-
-Keyset 'Sparse' - 24-bit keys with up to 8 bits set - 1271626 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 376.5, actual 180 (0.48x)
-Testing collisions (high 24-36 bits) - Worst is 35 bits: 26/47 (0.55x)
-Testing collisions (high 12-bit) - Expected 1271626.0, actual 1267530 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1271626.0, actual 1271370 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 376.5, actual 184 (0.49x)
-Testing collisions (low 24-36 bits) - Worst is 34 bits: 52/94 (0.55x)
-Testing collisions (low 12-bit) - Expected 1271626.0, actual 1267530 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1271626.0, actual 1271370 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 8 - 0.085%
-
-Keyset 'Sparse' - 32-bit keys with up to 7 bits set - 4514873 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 4746.0, actual 2412 (0.51x)
-Testing collisions (high 26-39 bits) - Worst is 39 bits: 24/37 (0.65x)
-Testing collisions (high 12-bit) - Expected 4514873.0, actual 4510777 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 4514873.0, actual 4514617 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 4746.0, actual 2445 (0.52x)
-Testing collisions (low 26-39 bits) - Worst is 34 bits: 630/1186 (0.53x)
-Testing collisions (low 12-bit) - Expected 4514873.0, actual 4510777 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 4514873.0, actual 4514617 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 47 - 0.045%
-
-Keyset 'Sparse' - 40-bit keys with up to 6 bits set - 4598479 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 4923.4, actual 2402 (0.49x)
-Testing collisions (high 26-39 bits) - Worst is 34 bits: 639/1230 (0.52x)
-Testing collisions (high 12-bit) - Expected 4598479.0, actual 4594383 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 4598479.0, actual 4598223 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 4923.4, actual 2444 (0.50x)
-Testing collisions (low 26-39 bits) - Worst is 39 bits: 22/38 (0.57x)
-Testing collisions (low 12-bit) - Expected 4598479.0, actual 4594383 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 4598479.0, actual 4598223 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 62 - 0.044%
-
-Keyset 'Sparse' - 48-bit keys with up to 6 bits set - 14196869 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 46927.3, actual 23533 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 43 bits: 19/22 (0.83x)
-Testing collisions (high 12-bit) - Expected 14196869.0, actual 14192773 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 14196869.0, actual 14196613 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 46927.3, actual 23338 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 35 bits: 2947/5865 (0.50x)
-Testing collisions (low 12-bit) - Expected 14196869.0, actual 14192773 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 14196869.0, actual 14196613 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 45 - 0.021%
-
-Keyset 'Sparse' - 56-bit keys with up to 5 bits set - 4216423 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 4139.3, actual 2065 (0.50x)
-Testing collisions (high 26-39 bits) - Worst is 39 bits: 22/32 (0.68x)
-Testing collisions (high 12-bit) - Expected 4216423.0, actual 4212327 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 4216423.0, actual 4216167 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 4139.3, actual 1999 (0.48x)
-Testing collisions (low 26-39 bits) - Worst is 31 bits: 4110/8278 (0.50x)
-Testing collisions (low 12-bit) - Expected 4216423.0, actual 4212327 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 4216423.0, actual 4216167 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 26 - 0.049%
-
-Keyset 'Sparse' - 64-bit keys with up to 5 bits set - 8303633 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16053.7, actual 7972 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 40 bits: 39/62 (0.62x)
-Testing collisions (high 12-bit) - Expected 8303633.0, actual 8299537 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8303633.0, actual 8303377 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16053.7, actual 7866 (0.49x)
-Testing collisions (low 27-41 bits) - Worst is 40 bits: 36/62 (0.57x)
-Testing collisions (low 12-bit) - Expected 8303633.0, actual 8299537 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8303633.0, actual 8303377 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 61 - 0.047%
-
-Keyset 'Sparse' - 72-bit keys with up to 5 bits set - 15082603 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 52965.5, actual 26424 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 42 bits: 32/51 (0.62x)
-Testing collisions (high 12-bit) - Expected 15082603.0, actual 15078507 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 15082603.0, actual 15082347 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 52965.5, actual 26433 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 42 bits: 34/51 (0.66x)
-Testing collisions (low 12-bit) - Expected 15082603.0, actual 15078507 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 15082603.0, actual 15082347 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 59 - 0.022%
-
-Keyset 'Sparse' - 96-bit keys with up to 4 bits set - 3469497 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 2802.7, actual 1406 (0.50x)
-Testing collisions (high 26-39 bits) - Worst is 33 bits: 706/1401 (0.50x)
-Testing collisions (high 12-bit) - Expected 3469497.0, actual 3465401 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 3469497.0, actual 3469241 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 2802.7, actual 1374 (0.49x)
-Testing collisions (low 26-39 bits) - Worst is 37 bits: 44/87 (0.50x)
-Testing collisions (low 12-bit) - Expected 3469497.0, actual 3465401 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 3469497.0, actual 3469241 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 5 - 0.066%
-
-Keyset 'Sparse' - 160-bit keys with up to 4 bits set - 26977161 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 169446.5, actual 84730 (0.50x)
-Testing collisions (high 29-45 bits) - Worst is 45 bits: 14/20 (0.68x)
-Testing collisions (high 12-bit) - Expected 26977161.0, actual 26973065 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 26977161.0, actual 26976905 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 169446.5, actual 84408 (0.50x)
-Testing collisions (low 29-45 bits) - Worst is 36 bits: 5329/10590 (0.50x)
-Testing collisions (low 12-bit) - Expected 26977161.0, actual 26973065 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 26977161.0, actual 26976905 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 20 - 0.010%
-
-Keyset 'Sparse' - 256-bit keys with up to 3 bits set - 2796417 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1820.7, actual 908 (0.50x)
-Testing collisions (high 25-38 bits) - Worst is 35 bits: 118/227 (0.52x)
-Testing collisions (high 12-bit) - Expected 2796417.0, actual 2792321 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2796417.0, actual 2796161 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1820.7, actual 921 (0.51x)
-Testing collisions (low 25-38 bits) - Worst is 38 bits: 18/28 (0.63x)
-Testing collisions (low 12-bit) - Expected 2796417.0, actual 2792321 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2796417.0, actual 2796161 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 8 - 0.067%
-
-Keyset 'Sparse' - 512-bit keys with up to 3 bits set - 22370049 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 116512.9, actual 58015 (0.50x)
-Testing collisions (high 28-44 bits) - Worst is 44 bits: 19/28 (0.67x)
-Testing collisions (high 12-bit) - Expected 22370049.0, actual 22365953 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 22370049.0, actual 22369793 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 116512.9, actual 58134 (0.50x)
-Testing collisions (low 28-44 bits) - Worst is 40 bits: 241/455 (0.53x)
-Testing collisions (low 12-bit) - Expected 22370049.0, actual 22365953 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 22370049.0, actual 22369793 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 62 - 0.016%
-
-Keyset 'Sparse' - 1024-bit keys with up to 2 bits set - 524801 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 64.1, actual 30 (0.47x)
-Testing collisions (high 23-33 bits) - Worst is 33 bits: 21/32 (0.65x)
-Testing collisions (high 12-bit) - Expected 524801.0, actual 520705 (0.99x) (-4096)
-Testing collisions (high 8-bit) - Expected 524801.0, actual 524545 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 64.1, actual 37 (0.58x)
-Testing collisions (low 23-33 bits) - Worst is 33 bits: 23/32 (0.72x)
-Testing collisions (low 12-bit) - Expected 524801.0, actual 520705 (0.99x) (-4096)
-Testing collisions (low 8-bit) - Expected 524801.0, actual 524545 (1.00x) (-256)
-Testing distribution - Worst bias is the 16-bit window at bit 54 - 0.182%
-
-Keyset 'Sparse' - 2048-bit keys with up to 2 bits set - 2098177 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1025.0, actual 529 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 22/32 (0.69x)
-Testing collisions (high 12-bit) - Expected 2098177.0, actual 2094081 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2098177.0, actual 2097921 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1025.0, actual 525 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 24/32 (0.75x)
-Testing collisions (low 12-bit) - Expected 2098177.0, actual 2094081 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2098177.0, actual 2097921 (1.00x) (-256)
-Testing distribution - Worst bias is the 18-bit window at bit 4 - 0.088%
-
-
-[[[ Keyset 'Permutation' Tests ]]]
-
-Combination Lowbits Tests:
-Keyset 'Combination' - up to 7 blocks from a set of 8 - 2396744 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1337.5, actual 659 (0.49x)
-Testing collisions (high 25-38 bits) - Worst is 36 bits: 55/83 (0.66x)
-Testing collisions (high 12-bit) - Expected 2396744.0, actual 2392648 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2396744.0, actual 2396488 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1337.5, actual 692 (0.52x)
-Testing collisions (low 25-38 bits) - Worst is 38 bits: 13/20 (0.62x)
-Testing collisions (low 12-bit) - Expected 2396744.0, actual 2392648 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2396744.0, actual 2396488 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 8 - 0.049%
-
-
-Combination Highbits Tests
-Keyset 'Combination' - up to 7 blocks from a set of 8 - 2396744 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1337.5, actual 668 (0.50x)
-Testing collisions (high 25-38 bits) - Worst is 34 bits: 175/334 (0.52x)
-Testing collisions (high 12-bit) - Expected 2396744.0, actual 2392648 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2396744.0, actual 2396488 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1337.5, actual 675 (0.50x)
-Testing collisions (low 25-38 bits) - Worst is 36 bits: 54/83 (0.65x)
-Testing collisions (low 12-bit) - Expected 2396744.0, actual 2392648 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2396744.0, actual 2396488 (1.00x) (-256)
-Testing distribution - Worst bias is the 18-bit window at bit 5 - 0.074%
-
-
-Combination Hi-Lo Tests:
-Keyset 'Combination' - up to 6 blocks from a set of 15 - 12204240 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 34678.6, actual 17094 (0.49x)
-Testing collisions (high 27-42 bits) - Worst is 36 bits: 1095/2167 (0.51x)
-Testing collisions (high 12-bit) - Expected 12204240.0, actual 12200144 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 12204240.0, actual 12203984 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 34678.6, actual 17320 (0.50x)
-Testing collisions (low 27-42 bits) - Worst is 40 bits: 75/135 (0.55x)
-Testing collisions (low 12-bit) - Expected 12204240.0, actual 12200144 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 12204240.0, actual 12203984 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 12 - 0.032%
-
-
-Combination 0x8000000 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8224 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 33 bits: 4198/8191 (0.51x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8166 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 36 bits: 529/1023 (0.52x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 26 - 0.040%
-
-
-Combination 0x0000001 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8221 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 38 bits: 139/255 (0.54x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8070 (0.49x)
-Testing collisions (low 27-41 bits) - Worst is 37 bits: 273/511 (0.53x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 33 - 0.045%
-
-
-Combination 0x800000000000000 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8143 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 41 bits: 20/31 (0.63x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8230 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 38 bits: 144/255 (0.56x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 54 - 0.035%
-
-
-Combination 0x000000000000001 Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8039 (0.49x)
-Testing collisions (high 27-41 bits) - Worst is 41 bits: 17/31 (0.53x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8271 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 41 bits: 20/31 (0.63x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 40 - 0.045%
-
-
-Combination 16-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8194 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 33 bits: 4138/8191 (0.51x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8163 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 41 bits: 20/31 (0.63x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 9 - 0.037%
-
-
-Combination 16-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8063 (0.49x)
-Testing collisions (high 27-41 bits) - Worst is 41 bits: 18/31 (0.56x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8241 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 39 bits: 91/127 (0.71x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 18 - 0.035%
-
-
-Combination 32-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 7942 (0.48x)
-Testing collisions (high 27-41 bits) - Worst is 41 bits: 17/31 (0.53x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8191 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 41 bits: 17/31 (0.53x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 5 - 0.038%
-
-
-Combination 32-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8218 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 39 bits: 71/127 (0.55x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8144 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 30 bits: 32683/65535 (0.50x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 42 - 0.039%
-
-
-Combination 64-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8140 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 40 bits: 39/63 (0.61x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8127 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 40 bits: 34/63 (0.53x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 53 - 0.042%
-
-
-Combination 64-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8178 (0.50x)
-Testing collisions (high 27-41 bits) - Worst is 40 bits: 46/63 (0.72x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8354 (0.51x)
-Testing collisions (low 27-41 bits) - Worst is 38 bits: 136/255 (0.53x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 26 - 0.038%
-
-
-Combination 128-bytes [0-1] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8384 (0.51x)
-Testing collisions (high 27-41 bits) - Worst is 32 bits: 8384/16383 (0.51x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8287 (0.51x)
-Testing collisions (low 27-41 bits) - Worst is 33 bits: 4188/8191 (0.51x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 23 - 0.037%
-
-
-Combination 128-bytes [0-last] Tests:
-Keyset 'Combination' - up to 22 blocks from a set of 2 - 8388606 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 16384.0, actual 8104 (0.49x)
-Testing collisions (high 27-41 bits) - Worst is 34 bits: 2045/4095 (0.50x)
-Testing collisions (high 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 16384.0, actual 8263 (0.50x)
-Testing collisions (low 27-41 bits) - Worst is 41 bits: 19/31 (0.59x)
-Testing collisions (low 12-bit) - Expected 8388606.0, actual 8384510 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 8388606.0, actual 8388350 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 16 - 0.040%
-
-
-[[[ Keyset 'Window' Tests ]]]
-
-Keyset 'Window' - 32-bit key, 25-bit window - 32 tests, 33554432 keys per test
-Window at 0 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 1 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 2 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 3 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 4 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 5 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 6 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 7 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 8 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 9 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 10 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 11 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 12 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 13 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 14 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 15 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 16 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 17 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 18 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 19 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 20 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 21 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 22 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 23 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 24 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 25 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 26 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 27 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 28 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 29 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 30 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 31 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Window at 32 - Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-
-[[[ Keyset 'Cyclic' Tests ]]]
-
-Keyset 'Cyclic' - 8 cycles of 8 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 232.8, actual 107 (0.46x)
-Testing collisions (high 24-35 bits) - Worst is 34 bits: 38/58 (0.65x)
-Testing collisions (high 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 232.8, actual 100 (0.43x)
-Testing collisions (low 24-35 bits) - Worst is 27 bits: 3707/7450 (0.50x)
-Testing collisions (low 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 63 - 0.088%
-
-Keyset 'Cyclic' - 8 cycles of 9 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 232.8, actual 106 (0.46x)
-Testing collisions (high 24-35 bits) - Worst is 26 bits: 7405/14901 (0.50x)
-Testing collisions (high 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 232.8, actual 126 (0.54x)
-Testing collisions (low 24-35 bits) - Worst is 35 bits: 18/29 (0.62x)
-Testing collisions (low 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 55 - 0.099%
-
-Keyset 'Cyclic' - 8 cycles of 10 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 232.8, actual 127 (0.55x)
-Testing collisions (high 24-35 bits) - Worst is 33 bits: 66/116 (0.57x)
-Testing collisions (high 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 232.8, actual 104 (0.45x)
-Testing collisions (low 24-35 bits) - Worst is 27 bits: 3807/7450 (0.51x)
-Testing collisions (low 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 7 - 0.136%
-
-Keyset 'Cyclic' - 8 cycles of 11 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 232.8, actual 118 (0.51x)
-Testing collisions (high 24-35 bits) - Worst is 34 bits: 33/58 (0.57x)
-Testing collisions (high 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 232.8, actual 128 (0.55x)
-Testing collisions (low 24-35 bits) - Worst is 32 bits: 128/232 (0.55x)
-Testing collisions (low 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 38 - 0.115%
-
-Keyset 'Cyclic' - 8 cycles of 12 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 232.8, actual 91 (0.39x)
-Testing collisions (high 24-35 bits) - Worst is 27 bits: 3813/7450 (0.51x)
-Testing collisions (high 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 232.8, actual 102 (0.44x)
-Testing collisions (low 24-35 bits) - Worst is 25 bits: 14959/29802 (0.50x)
-Testing collisions (low 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 63 - 0.130%
-
-Keyset 'Cyclic' - 8 cycles of 16 bytes - 1000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 232.8, actual 122 (0.52x)
-Testing collisions (high 24-35 bits) - Worst is 35 bits: 17/29 (0.58x)
-Testing collisions (high 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 232.8, actual 116 (0.50x)
-Testing collisions (low 24-35 bits) - Worst is 33 bits: 61/116 (0.52x)
-Testing collisions (low 12-bit) - Expected 1000000.0, actual 995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 1000000.0, actual 999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 17-bit window at bit 19 - 0.122%
-
-
-[[[ Keyset 'TwoBytes' Tests ]]]
-
-Keyset 'TwoBytes' - up-to-4-byte keys, 652545 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 99.1, actual 47 (0.47x)
-Testing collisions (high 23-34 bits) - Worst is 34 bits: 16/24 (0.65x)
-Testing collisions (high 12-bit) - Expected 652545.0, actual 648449 (0.99x) (-4096)
-Testing collisions (high 8-bit) - Expected 652545.0, actual 652289 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 99.1, actual 46 (0.46x)
-Testing collisions (low 23-34 bits) - Worst is 33 bits: 28/49 (0.56x)
-Testing collisions (low 12-bit) - Expected 652545.0, actual 648449 (0.99x) (-4096)
-Testing collisions (low 8-bit) - Expected 652545.0, actual 652289 (1.00x) (-256)
-Testing distribution - Worst bias is the 16-bit window at bit 34 - 0.138%
-
-Keyset 'TwoBytes' - up-to-8-byte keys, 5471025 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 6969.1, actual 3548 (0.51x)
-Testing collisions (high 26-40 bits) - Worst is 40 bits: 15/27 (0.55x)
-Testing collisions (high 12-bit) - Expected 5471025.0, actual 5466929 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 5471025.0, actual 5470769 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 6969.1, actual 3378 (0.48x)
-Testing collisions (low 26-40 bits) - Worst is 39 bits: 34/54 (0.62x)
-Testing collisions (low 12-bit) - Expected 5471025.0, actual 5466929 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 5471025.0, actual 5470769 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 12 - 0.056%
-
-Keyset 'TwoBytes' - up-to-12-byte keys, 18616785 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 80695.5, actual 40607 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 42 bits: 42/78 (0.53x)
-Testing collisions (high 12-bit) - Expected 18616785.0, actual 18612689 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 18616785.0, actual 18616529 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 80695.5, actual 40085 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 36 bits: 2521/5043 (0.50x)
-Testing collisions (low 12-bit) - Expected 18616785.0, actual 18612689 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 18616785.0, actual 18616529 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 56 - 0.012%
-
-Keyset 'TwoBytes' - up-to-16-byte keys, 44251425 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 455926.3, actual 227080 (0.50x)
-Testing collisions (high 29-46 bits) - Worst is 46 bits: 15/27 (0.54x)
-Testing collisions (high 12-bit) - Expected 44251425.0, actual 44247329 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 44251425.0, actual 44251169 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 455926.3, actual 226684 (0.50x)
-Testing collisions (low 29-46 bits) - Worst is 33 bits: 113923/227963 (0.50x)
-Testing collisions (low 12-bit) - Expected 44251425.0, actual 44247329 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 44251425.0, actual 44251169 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 0 - 0.007%
-
-Keyset 'TwoBytes' - up-to-20-byte keys, 86536545 total keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1743569.4, actual 866241 (0.50x)
-Testing collisions (high 30-48 bits) - Worst is 36 bits: 54556/108973 (0.50x)
-Testing collisions (high 12-bit) - Expected 86536545.0, actual 86532449 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 86536545.0, actual 86536289 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1743569.4, actual 865870 (0.50x)
-Testing collisions (low 30-48 bits) - Worst is 37 bits: 27421/54486 (0.50x)
-Testing collisions (low 12-bit) - Expected 86536545.0, actual 86532449 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 86536545.0, actual 86536289 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 5 - 0.005%
-
-
-[[[ Keyset 'Text' Tests ]]]
-
-Keyset 'Text' - keys of form "Foo[XXXX]Bar" - 14776336 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 50836.3, actual 25649 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 34 bits: 6513/12709 (0.51x)
-Testing collisions (high 12-bit) - Expected 14776336.0, actual 14772240 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 14776336.0, actual 14776080 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 50836.3, actual 25314 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 40 bits: 108/198 (0.54x)
-Testing collisions (low 12-bit) - Expected 14776336.0, actual 14772240 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 14776336.0, actual 14776080 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 35 - 0.020%
-
-Keyset 'Text' - keys of form "FooBar[XXXX]" - 14776336 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 50836.3, actual 25522 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 43 bits: 15/24 (0.60x)
-Testing collisions (high 12-bit) - Expected 14776336.0, actual 14772240 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 14776336.0, actual 14776080 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 50836.3, actual 25294 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 41 bits: 61/99 (0.61x)
-Testing collisions (low 12-bit) - Expected 14776336.0, actual 14772240 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 14776336.0, actual 14776080 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 37 - 0.017%
-
-Keyset 'Text' - keys of form "[XXXX]FooBar" - 14776336 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 50836.3, actual 25439 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 38 bits: 416/794 (0.52x)
-Testing collisions (high 12-bit) - Expected 14776336.0, actual 14772240 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 14776336.0, actual 14776080 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 50836.3, actual 25310 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 42 bits: 32/49 (0.64x)
-Testing collisions (low 12-bit) - Expected 14776336.0, actual 14772240 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 14776336.0, actual 14776080 (1.00x) (-256)
-Testing distribution - Worst bias is the 20-bit window at bit 2 - 0.025%
-
-
-[[[ Keyset 'Zeroes' Tests ]]]
-
-Keyset 'Zeroes' - 204800 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 9.8, actual 5 (0.51x)
-Testing collisions (high 21-30 bits) - Worst is 29 bits: 41/78 (0.52x)
-Testing collisions (high 12-bit) - Expected 204800.0, actual 200704 (0.98x)
-Testing collisions (high 8-bit) - Expected 204800.0, actual 204544 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 9.8, actual 4 (0.41x)
-Testing collisions (low 21-30 bits) - Worst is 25 bits: 643/1249 (0.51x)
-Testing collisions (low 12-bit) - Expected 204800.0, actual 200704 (0.98x)
-Testing collisions (low 8-bit) - Expected 204800.0, actual 204544 (1.00x) (-256)
-Testing distribution - Worst bias is the 15-bit window at bit 14 - 0.281%
-
-
-[[[ Keyset 'Seed' Tests ]]]
-
-Keyset 'Seed' - 5000000 keys
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 5820.8, actual 2880 (0.49x)
-Testing collisions (high 26-40 bits) - Worst is 37 bits: 105/181 (0.58x)
-Testing collisions (high 12-bit) - Expected 5000000.0, actual 4995904 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 5000000.0, actual 4999744 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 5820.8, actual 2957 (0.51x)
-Testing collisions (low 26-40 bits) - Worst is 33 bits: 1494/2910 (0.51x)
-Testing collisions (low 12-bit) - Expected 5000000.0, actual 4995904 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 5000000.0, actual 4999744 (1.00x) (-256)
-Testing distribution - Worst bias is the 19-bit window at bit 59 - 0.046%
-
-
-[[[ Keyset 'PerlinNoise' Tests ]]]
-
-Testing 16777216 coordinates (L2) :
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 65536.0, actual 32715 (0.50x)
-Testing collisions (high 28-43 bits) - Worst is 42 bits: 46/63 (0.72x)
-Testing collisions (high 12-bit) - Expected 16777216.0, actual 16773120 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 16777216.0, actual 16776960 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 65536.0, actual 32752 (0.50x)
-Testing collisions (low 28-43 bits) - Worst is 41 bits: 69/127 (0.54x)
-Testing collisions (low 12-bit) - Expected 16777216.0, actual 16773120 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 16777216.0, actual 16776960 (1.00x) (-256)
-
-
-[[[ Diff 'Differential' Tests ]]]
-
-Testing 8303632 up-to-5-bit differentials in 64-bit keys -> 64 bit hashes.
-1000 reps, 8303632000 total tests, expecting 0.00 random collisions..........
-0 total collisions, of which 0 single collisions were ignored
-
-Testing 11017632 up-to-4-bit differentials in 128-bit keys -> 64 bit hashes.
-1000 reps, 11017632000 total tests, expecting 0.00 random collisions..........
-0 total collisions, of which 0 single collisions were ignored
-
-Testing 2796416 up-to-3-bit differentials in 256-bit keys -> 64 bit hashes.
-1000 reps, 2796416000 total tests, expecting 0.00 random collisions..........
-0 total collisions, of which 0 single collisions were ignored
-
-
-[[[ DiffDist 'Differential Distribution' Tests ]]]
-
-Testing bit 0
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 516 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 470 (0.46x)
-Testing collisions (low 25-37 bits) - Worst is 28 bits: 8112/16383 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 1
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 514 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 24/31 (0.75x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 507 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 2
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 536 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 135/255 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 479 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 29 bits: 4068/8191 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 3
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 535 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 535/1023 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 533 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 31 bits: 1106/2047 (0.54x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 4
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 519 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 17/31 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 513 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 33 bits: 274/511 (0.54x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 5
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 520 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 520/1023 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 527 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 33 bits: 269/511 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 6
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 519 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 41/63 (0.64x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 518 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 29 bits: 4236/8191 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 7
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 463 (0.45x)
-Testing collisions (high 25-37 bits) - Worst is 28 bits: 8190/16383 (0.50x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 497 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 34 bits: 134/255 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 8
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 513 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 21/31 (0.66x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 470 (0.46x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 32/63 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 9
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 527 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 37/63 (0.58x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 541 (0.53x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 10
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 516 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 142/255 (0.55x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 470 (0.46x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 11
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 500 (0.49x)
-Testing collisions (high 25-37 bits) - Worst is 31 bits: 1038/2047 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 526 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 34/63 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 12
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 503 (0.49x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 83/127 (0.65x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 479 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 68/127 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 13
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 515 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 40/63 (0.63x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 468 (0.46x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 33/63 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 14
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 465 (0.45x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 33/63 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 549 (0.54x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 20/31 (0.63x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 15
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 523 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 35/63 (0.55x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 537 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 71/127 (0.55x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 16
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 517 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 484 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 25/31 (0.78x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 17
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 504 (0.49x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 18/31 (0.56x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 487 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 68/127 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 18
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 534 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 33 bits: 280/511 (0.55x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 519 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 22/31 (0.69x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 19
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 571 (0.56x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 22/31 (0.69x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 493 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 33/63 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 20
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 536 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 33 bits: 272/511 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 536 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 23/31 (0.72x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 21
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 464 (0.45x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 67/127 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 536 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 81/127 (0.63x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 22
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 508 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 131/255 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 482 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 30 bits: 2054/4095 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 23
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 492 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 20/31 (0.63x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 493 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 28 bits: 8176/16383 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 24
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 518 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 30 bits: 2102/4095 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 463 (0.45x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 33/63 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 25
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 532 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 532/1023 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 514 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 31 bits: 1032/2047 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 26
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 479 (0.47x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 40/63 (0.63x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 532 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 33 bits: 269/511 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 27
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 511 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 33 bits: 272/511 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 450 (0.44x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 18/31 (0.56x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 28
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 538 (0.53x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 138/255 (0.54x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 520 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 29
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 525 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 525/1023 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 516 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 23/31 (0.72x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 30
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 483 (0.47x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 66/127 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 512 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 30 bits: 2100/4095 (0.51x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 31
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 503 (0.49x)
-Testing collisions (high 25-37 bits) - Worst is 27 bits: 16180/32767 (0.49x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 514 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 21/31 (0.66x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 32
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 557 (0.54x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 21/31 (0.66x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 502 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 30 bits: 2087/4095 (0.51x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 33
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 494 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 17/31 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 481 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 37/63 (0.58x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 34
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 520 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 22/31 (0.69x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 500 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 21/31 (0.66x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 35
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 526 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 526/1023 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 507 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 34 bits: 134/255 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 36
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 530 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 20/31 (0.63x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 503 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 31 bits: 1034/2047 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 37
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 489 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 67/127 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 482 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 36/63 (0.56x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 38
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 521 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 33 bits: 273/511 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 498 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 30 bits: 2041/4095 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 39
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 483 (0.47x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 72/127 (0.56x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 529 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 20/31 (0.63x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 40
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 489 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 33/63 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 499 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 29 bits: 4246/8191 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 41
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 536 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 137/255 (0.54x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 543 (0.53x)
-Testing collisions (low 25-37 bits) - Worst is 33 bits: 281/511 (0.55x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 42
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 513 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 31 bits: 1082/2047 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 494 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 34 bits: 131/255 (0.51x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 43
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 495 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 29 bits: 4158/8191 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 473 (0.46x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 16/31 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 44
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 479 (0.47x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 541 (0.53x)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 74/127 (0.58x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 45
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 531 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 531/1023 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 513 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 18/31 (0.56x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 46
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 531 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 37/63 (0.58x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 510 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 17/31 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 47
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 502 (0.49x)
-Testing collisions (high 25-37 bits) - Worst is 28 bits: 8325/16383 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 529 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 39/63 (0.61x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 48
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 512 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 35 bits: 69/127 (0.54x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 495 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 33/63 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 49
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 551 (0.54x)
-Testing collisions (high 25-37 bits) - Worst is 36 bits: 38/63 (0.59x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 470 (0.46x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 37/63 (0.58x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 50
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 483 (0.47x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 22/31 (0.69x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 512 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 31 bits: 1030/2047 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 51
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 520 (0.51x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 17/31 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 510 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 31 bits: 1040/2047 (0.51x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 52
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 531 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 531/1023 (0.52x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 534 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 22/31 (0.69x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 53
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 546 (0.53x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 26/31 (0.81x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 483 (0.47x)
-Testing collisions (low 25-37 bits) - Worst is 35 bits: 65/127 (0.51x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 54
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 488 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 29 bits: 4102/8191 (0.50x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 501 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 21/31 (0.66x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 55
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 509 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 130/255 (0.51x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 493 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 34 bits: 136/255 (0.53x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 56
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 528 (0.52x)
-Testing collisions (high 25-37 bits) - Worst is 33 bits: 274/511 (0.54x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 551 (0.54x)
-Testing collisions (low 25-37 bits) - Worst is 32 bits: 551/1023 (0.54x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 57
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 556 (0.54x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 157/255 (0.61x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 489 (0.48x)
-Testing collisions (low 25-37 bits) - Worst is 30 bits: 2047/4095 (0.50x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 58
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 467 (0.46x)
-Testing collisions (high 25-37 bits) - Worst is 37 bits: 18/31 (0.56x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 523 (0.51x)
-Testing collisions (low 25-37 bits) - Worst is 36 bits: 39/63 (0.61x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 59
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 497 (0.49x)
-Testing collisions (high 25-37 bits) - Worst is 30 bits: 2031/4095 (0.50x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 530 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 33 bits: 278/511 (0.54x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 60
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 510 (0.50x)
-Testing collisions (high 25-37 bits) - Worst is 28 bits: 8176/16383 (0.50x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 517 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 19/31 (0.59x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 61
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 496 (0.48x)
-Testing collisions (high 25-37 bits) - Worst is 30 bits: 2041/4095 (0.50x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 529 (0.52x)
-Testing collisions (low 25-37 bits) - Worst is 32 bits: 529/1023 (0.52x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 62
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 552 (0.54x)
-Testing collisions (high 25-37 bits) - Worst is 32 bits: 552/1023 (0.54x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 507 (0.50x)
-Testing collisions (low 25-37 bits) - Worst is 37 bits: 18/31 (0.56x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-Testing bit 63
-Testing collisions ( 64-bit) - Expected 0.0, actual 0 (0.00x)
-Testing collisions (high 32-bit) - Expected 1024.0, actual 484 (0.47x)
-Testing collisions (high 25-37 bits) - Worst is 34 bits: 135/255 (0.53x)
-Testing collisions (high 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (high 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-Testing collisions (low 32-bit) - Expected 1024.0, actual 500 (0.49x)
-Testing collisions (low 25-37 bits) - Worst is 33 bits: 277/511 (0.54x)
-Testing collisions (low 12-bit) - Expected 2097152.0, actual 2093056 (1.00x) (-4096)
-Testing collisions (low 8-bit) - Expected 2097152.0, actual 2096896 (1.00x) (-256)
-
-
-[[[ MomentChi2 Tests ]]]
-
-Analyze hashes produced from a serie of linearly increasing numbers of 32-bit, using a step of 3 ...
-Target values to approximate : 38918200.000000 - 410450.000000
-Popcount 1 stats : 38918484.206651 - 410464.360454
-Popcount 0 stats : 38919365.145760 - 410461.861348
-MomentChi2 for bits 1 : 0.0983945
-MomentChi2 for bits 0 : 1.65373
-
-Derivative stats (transition from 2 consecutive values) :
-Popcount 1 stats : 38917342.700616 - 410405.257542
-Popcount 0 stats : 38919729.298852 - 410467.929221
-MomentChi2 for deriv b1 : 0.895362
-MomentChi2 for deriv b0 : 2.84895
-
- Great !!
-
-
-
-Input vcode 0x00000001, Output vcode 0x00000001, Result vcode 0x00000001
-Verification value is 0x00000001 - Testing took 934.304636 seconds
--------------------------------------------------------------------------------
diff --git a/src/aes_hash.rs b/src/aes_hash.rs
index 54f8b6d..1c98582 100644
--- a/src/aes_hash.rs
+++ b/src/aes_hash.rs
@@ -1,9 +1,10 @@
use crate::convert::*;
-use crate::operations::*;
#[cfg(feature = "specialize")]
-use crate::HasherExt;
-use core::hash::Hasher;
+use crate::fallback_hash::MULTIPLE;
+use crate::operations::*;
use crate::RandomState;
+use core::hash::Hasher;
+use crate::random_state::PI;
/// A `Hasher` for hashing an arbitrary stream of bytes.
///
@@ -50,6 +51,9 @@ impl AHasher {
/// ```
#[inline]
pub fn new_with_keys(key1: u128, key2: u128) -> Self {
+ let pi: [u128; 2] = PI.convert();
+ let key1 = key1 ^ pi[0];
+ let key2 = key2 ^ pi[1];
Self {
enc: key1,
sum: key2,
@@ -57,6 +61,16 @@ impl AHasher {
}
}
+ #[allow(unused)] // False positive
+ pub(crate) fn test_with_keys(key1: u128, key2: u128) -> Self {
+ Self {
+ enc: key1,
+ sum: key2,
+ key: key1 ^ key2,
+ }
+ }
+
+
#[inline]
pub(crate) fn from_random_state(rand_state: &RandomState) -> Self {
let key1 = [rand_state.k0, rand_state.k1].convert();
@@ -89,18 +103,9 @@ impl AHasher {
self.enc = aesenc(self.enc, v2);
self.sum = shuffle_and_add(self.sum, v2);
}
-}
-
-#[cfg(feature = "specialize")]
-impl HasherExt for AHasher {
- #[inline]
- fn hash_u64(self, value: u64) -> u64 {
- let mask = self.sum as u64;
- let rot = (self.enc & 64) as u32;
- folded_multiply(value ^ mask, crate::fallback_hash::MULTIPLE).rotate_left(rot)
- }
#[inline]
+ #[cfg(feature = "specialize")]
fn short_finish(&self) -> u64 {
let combined = aesdec(self.sum, self.enc);
let result: [u64; 2] = aesenc(combined, combined).convert();
@@ -133,11 +138,18 @@ impl Hasher for AHasher {
}
#[inline]
+ #[cfg(any(target_pointer_width = "64", target_pointer_width = "32", target_pointer_width = "16"))]
fn write_usize(&mut self, i: usize) {
self.write_u64(i as u64);
}
#[inline]
+ #[cfg(target_pointer_width = "128")]
+ fn write_usize(&mut self, i: usize) {
+ self.write_u128(i as u128);
+ }
+
+ #[inline]
fn write_u64(&mut self, i: u64) {
self.write_u128(i as u128);
}
@@ -149,22 +161,8 @@ impl Hasher for AHasher {
let length = data.len();
self.add_in_length(length as u64);
//A 'binary search' on sizes reduces the number of comparisons.
- if data.len() < 8 {
- let value: [u64; 2] = if data.len() >= 2 {
- if data.len() >= 4 {
- //len 4-8
- [data.read_u32().0 as u64, data.read_last_u32() as u64]
- } else {
- //len 2-3
- [data.read_u16().0 as u64, data[data.len() - 1] as u64]
- }
- } else {
- if data.len() > 0 {
- [data[0] as u64, 0]
- } else {
- [0, 0]
- }
- };
+ if data.len() <= 8 {
+ let value = read_small(data);
self.hash_in(value.convert());
} else {
if data.len() > 32 {
@@ -221,6 +219,151 @@ impl Hasher for AHasher {
}
}
+#[cfg(feature = "specialize")]
+pub(crate) struct AHasherU64 {
+ pub(crate) buffer: u64,
+ pub(crate) pad: u64,
+}
+
+/// A specialized hasher for only primitives under 64 bits.
+#[cfg(feature = "specialize")]
+impl Hasher for AHasherU64 {
+ #[inline]
+ fn finish(&self) -> u64 {
+ let rot = (self.pad & 63) as u32;
+ self.buffer.rotate_left(rot)
+ }
+
+ #[inline]
+ fn write(&mut self, _bytes: &[u8]) {
+ unreachable!("Specialized hasher was called with a different type of object")
+ }
+
+ #[inline]
+ fn write_u8(&mut self, i: u8) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u16(&mut self, i: u16) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u32(&mut self, i: u32) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u64(&mut self, i: u64) {
+ self.buffer = folded_multiply(i ^ self.buffer, MULTIPLE);
+ }
+
+ #[inline]
+ fn write_u128(&mut self, _i: u128) {
+ unreachable!("Specialized hasher was called with a different type of object")
+ }
+
+ #[inline]
+ fn write_usize(&mut self, _i: usize) {
+ unreachable!("Specialized hasher was called with a different type of object")
+ }
+}
+
+#[cfg(feature = "specialize")]
+pub(crate) struct AHasherFixed(pub AHasher);
+
+/// A specialized hasher for fixed size primitives larger than 64 bits.
+#[cfg(feature = "specialize")]
+impl Hasher for AHasherFixed {
+ #[inline]
+ fn finish(&self) -> u64 {
+ self.0.short_finish()
+ }
+
+ #[inline]
+ fn write(&mut self, bytes: &[u8]) {
+ self.0.write(bytes)
+ }
+
+ #[inline]
+ fn write_u8(&mut self, i: u8) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u16(&mut self, i: u16) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u32(&mut self, i: u32) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u64(&mut self, i: u64) {
+ self.0.write_u64(i);
+ }
+
+ #[inline]
+ fn write_u128(&mut self, i: u128) {
+ self.0.write_u128(i);
+ }
+
+ #[inline]
+ fn write_usize(&mut self, i: usize) {
+ self.0.write_usize(i);
+ }
+}
+
+#[cfg(feature = "specialize")]
+pub(crate) struct AHasherStr(pub AHasher);
+
+/// A specialized hasher for strings
+/// Note that the other types don't panic because the hash impl for String tacks on an unneeded call. (As does vec)
+#[cfg(feature = "specialize")]
+impl Hasher for AHasherStr {
+ #[inline]
+ fn finish(&self) -> u64 {
+ let result : [u64; 2] = self.0.enc.convert();
+ result[0]
+ }
+
+ #[inline]
+ fn write(&mut self, bytes: &[u8]) {
+ if bytes.len() > 8 {
+ self.0.write(bytes);
+ self.0.enc = aesdec(self.0.sum, self.0.enc);
+ self.0.enc = aesenc(aesenc(self.0.enc, self.0.key), self.0.enc);
+ } else {
+ self.0.add_in_length(bytes.len() as u64);
+ let value = read_small(bytes).convert();
+ self.0.sum = shuffle_and_add(self.0.sum, value);
+ self.0.enc = aesdec(self.0.sum, self.0.enc);
+ self.0.enc = aesenc(aesenc(self.0.enc, self.0.key), self.0.enc);
+ }
+ }
+
+ #[inline]
+ fn write_u8(&mut self, _i: u8) {}
+
+ #[inline]
+ fn write_u16(&mut self, _i: u16) {}
+
+ #[inline]
+ fn write_u32(&mut self, _i: u32) {}
+
+ #[inline]
+ fn write_u64(&mut self, _i: u64) {}
+
+ #[inline]
+ fn write_u128(&mut self, _i: u128) {}
+
+ #[inline]
+ fn write_usize(&mut self, _i: usize) {}
+}
+
#[cfg(test)]
mod tests {
use super::*;
@@ -230,7 +373,7 @@ mod tests {
use std::hash::{BuildHasher, Hasher};
#[test]
fn test_sanity() {
- let mut hasher = RandomState::with_seeds(1, 2, 3,4).build_hasher();
+ let mut hasher = RandomState::with_seeds(1, 2, 3, 4).build_hasher();
hasher.write_u64(0);
let h1 = hasher.finish();
hasher.write(&[1, 0, 0, 0, 0, 0, 0, 0]);
@@ -293,3 +436,4 @@ mod tests {
assert_eq!(bytes, 0x6464646464646464);
}
}
+
diff --git a/src/convert.rs b/src/convert.rs
index 1bacb82..4c0a00e 100644
--- a/src/convert.rs
+++ b/src/convert.rs
@@ -8,13 +8,7 @@ macro_rules! convert {
#[inline(always)]
fn convert(self) -> $b {
unsafe {
- let mut result: $b = core::mem::zeroed();
- core::ptr::copy_nonoverlapping(
- &self as *const $a as *const u8,
- &mut result as *mut $b as *mut u8,
- core::mem::size_of::<$b>(),
- );
- return result;
+ core::mem::transmute::<$a, $b>(self)
}
}
}
@@ -22,13 +16,7 @@ macro_rules! convert {
#[inline(always)]
fn convert(self) -> $a {
unsafe {
- let mut result: $a = core::mem::zeroed();
- core::ptr::copy_nonoverlapping(
- &self as *const $b as *const u8,
- &mut result as *mut $a as *mut u8,
- core::mem::size_of::<$a>(),
- );
- return result;
+ core::mem::transmute::<$b, $a>(self)
}
}
}
diff --git a/src/fallback_hash.rs b/src/fallback_hash.rs
index 95aa8b3..aad9efc 100644
--- a/src/fallback_hash.rs
+++ b/src/fallback_hash.rs
@@ -1,10 +1,9 @@
use crate::convert::*;
use crate::operations::folded_multiply;
-#[cfg(feature = "specialize")]
-use crate::HasherExt;
-use core::hash::Hasher;
-use crate::RandomState;
+use crate::operations::read_small;
use crate::random_state::PI;
+use crate::RandomState;
+use core::hash::Hasher;
///This constant come from Kunth's prng (Empirically it works better than those from splitmix32).
pub(crate) const MULTIPLE: u64 = 6364136223846793005;
@@ -42,10 +41,21 @@ impl AHasher {
extra_keys: key2,
}
}
-
+
+ #[allow(unused)] // False positive
+ pub(crate) fn test_with_keys(key1: u128, key2: u128) -> Self {
+ let key1: [u64; 2] = key1.convert();
+ let key2: [u64; 2] = key2.convert();
+ Self {
+ buffer: key1[0],
+ pad: key1[1],
+ extra_keys: key2,
+ }
+ }
+
#[inline]
#[allow(dead_code)] // Is not called if non-fallback hash is used.
- pub(crate) fn from_random_state(rand_state: &RandomState) -> AHasher {
+ pub(crate) fn from_random_state(rand_state: &RandomState) -> AHasher {
AHasher {
buffer: rand_state.k0,
pad: rand_state.k1,
@@ -83,10 +93,19 @@ impl AHasher {
/// attacker somehow knew part of (but not all) the contents of the buffer before hand,
/// they would not be able to predict any of the bits in the buffer at the end.
#[inline(always)]
+ #[cfg(feature = "folded_multiply")]
fn update(&mut self, new_data: u64) {
self.buffer = folded_multiply(new_data ^ self.buffer, MULTIPLE);
}
+ #[inline(always)]
+ #[cfg(not(feature = "folded_multiply"))]
+ fn update(&mut self, new_data: u64) {
+ let d1 = (new_data ^ self.buffer).wrapping_mul(MULTIPLE);
+ self.pad = (self.pad ^ d1).rotate_left(8).wrapping_mul(MULTIPLE);
+ self.buffer = (self.buffer ^ self.pad).rotate_left(24);
+ }
+
/// Similar to the above this function performs an update using a "folded multiply".
/// However it takes in 128 bits of data instead of 64. Both halves must be masked.
///
@@ -99,22 +118,23 @@ impl AHasher {
/// can't be changed by the same set of input bits. To cancel this sequence with subsequent input would require
/// knowing the keys.
#[inline(always)]
+ #[cfg(feature = "folded_multiply")]
fn large_update(&mut self, new_data: u128) {
let block: [u64; 2] = new_data.convert();
let combined = folded_multiply(block[0] ^ self.extra_keys[0], block[1] ^ self.extra_keys[1]);
- self.buffer = (combined.wrapping_add(self.buffer) ^ self.pad).rotate_left(ROT);
+ self.buffer = (self.buffer.wrapping_add(self.pad) ^ combined).rotate_left(ROT);
}
-}
-#[cfg(feature = "specialize")]
-impl HasherExt for AHasher {
- #[inline]
- fn hash_u64(self, value: u64) -> u64 {
- let rot = (self.pad & 64) as u32;
- folded_multiply(value ^ self.buffer, MULTIPLE).rotate_left(rot)
+ #[inline(always)]
+ #[cfg(not(feature = "folded_multiply"))]
+ fn large_update(&mut self, new_data: u128) {
+ let block: [u64; 2] = new_data.convert();
+ self.update(block[0] ^ self.extra_keys[0]);
+ self.update(block[1] ^ self.extra_keys[1]);
}
#[inline]
+ #[cfg(feature = "specialize")]
fn short_finish(&self) -> u64 {
self.buffer.wrapping_add(self.pad)
}
@@ -150,11 +170,18 @@ impl Hasher for AHasher {
}
#[inline]
+ #[cfg(any(target_pointer_width = "64", target_pointer_width = "32", target_pointer_width = "16"))]
fn write_usize(&mut self, i: usize) {
self.write_u64(i as u64);
}
#[inline]
+ #[cfg(target_pointer_width = "128")]
+ fn write_usize(&mut self, i: usize) {
+ self.write_u128(i as u128);
+ }
+
+ #[inline]
#[allow(clippy::collapsible_if)]
fn write(&mut self, input: &[u8]) {
let mut data = input;
@@ -175,26 +202,165 @@ impl Hasher for AHasher {
self.large_update([data.read_u64().0, data.read_last_u64()].convert());
}
} else {
- if data.len() >= 2 {
- if data.len() >= 4 {
- let block = [data.read_u32().0 as u64, data.read_last_u32() as u64];
- self.large_update(block.convert());
- } else {
- let value = [data.read_u16().0 as u32, data[data.len() - 1] as u32];
- self.update(value.convert());
- }
- } else {
- if data.len() > 0 {
- self.update(data[0] as u64);
- }
- }
+ let value = read_small(data);
+ self.large_update(value.convert());
}
}
+
#[inline]
+ #[cfg(feature = "folded_multiply")]
fn finish(&self) -> u64 {
let rot = (self.buffer & 63) as u32;
folded_multiply(self.buffer, self.pad).rotate_left(rot)
}
+
+ #[inline]
+ #[cfg(not(feature = "folded_multiply"))]
+ fn finish(&self) -> u64 {
+ let rot = (self.buffer & 63) as u32;
+ (self.buffer.wrapping_mul(MULTIPLE) ^ self.pad).rotate_left(rot)
+ }
+}
+
+#[cfg(feature = "specialize")]
+pub(crate) struct AHasherU64 {
+ pub(crate) buffer: u64,
+ pub(crate) pad: u64,
+}
+
+/// A specialized hasher for only primitives under 64 bits.
+#[cfg(feature = "specialize")]
+impl Hasher for AHasherU64 {
+ #[inline]
+ fn finish(&self) -> u64 {
+ let rot = (self.pad & 63) as u32;
+ self.buffer.rotate_left(rot)
+ }
+
+ #[inline]
+ fn write(&mut self, _bytes: &[u8]) {
+ unreachable!("Specialized hasher was called with a different type of object")
+ }
+
+ #[inline]
+ fn write_u8(&mut self, i: u8) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u16(&mut self, i: u16) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u32(&mut self, i: u32) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u64(&mut self, i: u64) {
+ self.buffer = folded_multiply(i ^ self.buffer, MULTIPLE);
+ }
+
+ #[inline]
+ fn write_u128(&mut self, _i: u128) {
+ unreachable!("Specialized hasher was called with a different type of object")
+ }
+
+ #[inline]
+ fn write_usize(&mut self, _i: usize) {
+ unreachable!("Specialized hasher was called with a different type of object")
+ }
+}
+
+#[cfg(feature = "specialize")]
+pub(crate) struct AHasherFixed(pub AHasher);
+
+/// A specialized hasher for fixed size primitives larger than 64 bits.
+#[cfg(feature = "specialize")]
+impl Hasher for AHasherFixed {
+ #[inline]
+ fn finish(&self) -> u64 {
+ self.0.short_finish()
+ }
+
+ #[inline]
+ fn write(&mut self, bytes: &[u8]) {
+ self.0.write(bytes)
+ }
+
+ #[inline]
+ fn write_u8(&mut self, i: u8) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u16(&mut self, i: u16) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u32(&mut self, i: u32) {
+ self.write_u64(i as u64);
+ }
+
+ #[inline]
+ fn write_u64(&mut self, i: u64) {
+ self.0.write_u64(i);
+ }
+
+ #[inline]
+ fn write_u128(&mut self, i: u128) {
+ self.0.write_u128(i);
+ }
+
+ #[inline]
+ fn write_usize(&mut self, i: usize) {
+ self.0.write_usize(i);
+ }
+}
+
+#[cfg(feature = "specialize")]
+pub(crate) struct AHasherStr(pub AHasher);
+
+/// A specialized hasher for a single string
+/// Note that the other types don't panic because the hash impl for String tacks on an unneeded call. (As does vec)
+#[cfg(feature = "specialize")]
+impl Hasher for AHasherStr {
+ #[inline]
+ fn finish(&self) -> u64 {
+ self.0.finish()
+ }
+
+ #[inline]
+ fn write(&mut self, bytes: &[u8]) {
+ if bytes.len() > 8 {
+ self.0.write(bytes)
+ } else {
+ let value = read_small(bytes);
+ self.0.buffer = folded_multiply(value[0] ^ self.0.buffer,
+ value[1] ^ self.0.extra_keys[1]);
+ self.0.pad = self.0.pad.wrapping_add(bytes.len() as u64);
+ }
+ }
+
+ #[inline]
+ fn write_u8(&mut self, _i: u8) {}
+
+ #[inline]
+ fn write_u16(&mut self, _i: u16) {}
+
+ #[inline]
+ fn write_u32(&mut self, _i: u32) {}
+
+ #[inline]
+ fn write_u64(&mut self, _i: u64) {}
+
+ #[inline]
+ fn write_u128(&mut self, _i: u128) {}
+
+ #[inline]
+ fn write_usize(&mut self, _i: usize) {}
}
#[cfg(test)]
diff --git a/src/hash_map.rs b/src/hash_map.rs
index e04a00b..ec8fa43 100644
--- a/src/hash_map.rs
+++ b/src/hash_map.rs
@@ -8,11 +8,11 @@ use std::panic::UnwindSafe;
#[cfg(feature = "serde")]
use serde::{
- ser::{Serialize, Serializer},
de::{Deserialize, Deserializer},
+ ser::{Serialize, Serializer},
};
-use crate::{RandomState};
+use crate::RandomState;
/// A [`HashMap`](std::collections::HashMap) using [`RandomState`](crate::RandomState) to hash the items.
/// (Requires the `std` feature to be enabled.)
@@ -41,8 +41,10 @@ impl<K, V> AHashMap<K, V, RandomState> {
}
}
-impl<K, V, S> AHashMap<K, V, S> where S: BuildHasher {
-
+impl<K, V, S> AHashMap<K, V, S>
+where
+ S: BuildHasher,
+{
pub fn with_hasher(hash_builder: S) -> Self {
AHashMap(HashMap::with_hasher(hash_builder))
}
@@ -55,7 +57,7 @@ impl<K, V, S> AHashMap<K, V, S> where S: BuildHasher {
impl<K, V, S> AHashMap<K, V, S>
where
K: Hash + Eq,
- S: BuildHasher
+ S: BuildHasher,
{
/// Returns a reference to the value corresponding to the key.
///
@@ -324,9 +326,10 @@ impl<K, V> Default for AHashMap<K, V, RandomState> {
}
#[cfg(feature = "serde")]
-impl<K, V> Serialize for AHashMap<K, V>
-where K: Serialize + Eq + Hash,
- V: Serialize
+impl<K, V> Serialize for AHashMap<K, V>
+where
+ K: Serialize + Eq + Hash,
+ V: Serialize,
{
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
self.deref().serialize(serializer)
@@ -334,12 +337,13 @@ where K: Serialize + Eq + Hash,
}
#[cfg(feature = "serde")]
-impl<'de, K, V> Deserialize<'de> for AHashMap<K, V>
-where K: Deserialize<'de> + Eq + Hash,
- V: Deserialize<'de>
+impl<'de, K, V> Deserialize<'de> for AHashMap<K, V>
+where
+ K: Deserialize<'de> + Eq + Hash,
+ V: Deserialize<'de>,
{
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
- let hash_map = HashMap::deserialize(deserializer);
+ let hash_map = HashMap::deserialize(deserializer);
hash_map.map(|hash_map| Self(hash_map))
}
}
diff --git a/src/hash_quality_test.rs b/src/hash_quality_test.rs
index 62ba83b..4cd3156 100644
--- a/src/hash_quality_test.rs
+++ b/src/hash_quality_test.rs
@@ -1,4 +1,3 @@
-use crate::{CallHasher, HasherExt};
use core::hash::{Hash, Hasher};
use std::collections::HashMap;
@@ -83,8 +82,8 @@ fn test_no_full_collisions<T: Hasher>(gen_hash: impl Fn() -> T) {
if let Some(value) = map.get(&hash) {
assert_eq!(
value, &array,
- "Found a collision between {:x?} and {:x?}",
- value, &array
+ "Found a collision between {:x?} and {:x?}. Hash: {:x?}",
+ value, &array, &hash
);
} else {
map.insert(hash, array);
@@ -93,7 +92,7 @@ fn test_no_full_collisions<T: Hasher>(gen_hash: impl Fn() -> T) {
assert_eq!(2396744, map.len());
}
-fn test_keys_change_output<T: HasherExt>(constructor: impl Fn(u128, u128) -> T) {
+fn test_keys_change_output<T: Hasher>(constructor: impl Fn(u128, u128) -> T) {
let mut a = constructor(1, 1);
let mut b = constructor(1, 2);
let mut c = constructor(2, 1);
@@ -110,22 +109,22 @@ fn test_keys_change_output<T: HasherExt>(constructor: impl Fn(u128, u128) -> T)
assert_sufficiently_different(c.finish(), d.finish(), 1);
}
-fn test_input_affect_every_byte<T: HasherExt>(constructor: impl Fn(u128, u128) -> T) {
- let base = u128::get_hash(&0, constructor(0, 0));
+fn test_input_affect_every_byte<T: Hasher>(constructor: impl Fn(u128, u128) -> T) {
+ let base = hash_with(&0, constructor(0, 0));
for shift in 0..16 {
let mut alternitives = vec![];
for v in 0..256 {
let input = (v as u128) << (shift * 8);
let hasher = constructor(0, 0);
- alternitives.push(u128::get_hash(&input, hasher));
+ alternitives.push(hash_with(&input, hasher));
}
- assert_each_byte_differs(base, alternitives);
+ assert_each_byte_differs(shift, base, alternitives);
}
}
///Ensures that for every bit in the output there is some value for each byte in the key that flips it.
-fn test_keys_affect_every_byte<H: Hash, T: HasherExt>(item: H, constructor: impl Fn(u128, u128) -> T) {
- let base = H::get_hash(&item, constructor(0, 0));
+fn test_keys_affect_every_byte<H: Hash, T: Hasher>(item: H, constructor: impl Fn(u128, u128) -> T) {
+ let base = hash_with(&item, constructor(0, 0));
for shift in 0..16 {
let mut alternitives1 = vec![];
let mut alternitives2 = vec![];
@@ -133,22 +132,22 @@ fn test_keys_affect_every_byte<H: Hash, T: HasherExt>(item: H, constructor: impl
let input = (v as u128) << (shift * 8);
let hasher1 = constructor(input, 0);
let hasher2 = constructor(0, input);
- let h1 = H::get_hash(&item, hasher1);
- let h2 = H::get_hash(&item, hasher2);
+ let h1 = hash_with(&item, hasher1);
+ let h2 = hash_with(&item, hasher2);
alternitives1.push(h1);
alternitives2.push(h2);
}
- assert_each_byte_differs(base, alternitives1);
- assert_each_byte_differs(base, alternitives2);
+ assert_each_byte_differs(shift, base, alternitives1);
+ assert_each_byte_differs(shift, base, alternitives2);
}
}
-fn assert_each_byte_differs(base: u64, alternitives: Vec<u64>) {
+fn assert_each_byte_differs(num: u64, base: u64, alternitives: Vec<u64>) {
let mut changed_bits = 0_u64;
for alternitive in alternitives {
changed_bits |= base ^ alternitive
}
- assert_eq!(core::u64::MAX, changed_bits, "Bits changed: {:x}", changed_bits);
+ assert_eq!(core::u64::MAX, changed_bits, "Bits changed: {:x} on num: {:?}", changed_bits, num);
}
fn test_finish_is_consistent<T: Hasher>(constructor: impl Fn(u128, u128) -> T) {
@@ -191,7 +190,7 @@ fn test_single_key_bit_flip<T: Hasher>(constructor: impl Fn(u128, u128) -> T) {
}
}
-fn test_all_bytes_matter<T: HasherExt>(hasher: impl Fn() -> T) {
+fn test_all_bytes_matter<T: Hasher>(hasher: impl Fn() -> T) {
let mut item = vec![0; 256];
let base_hash = hash(&item, &hasher);
for pos in 0..256 {
@@ -202,7 +201,7 @@ fn test_all_bytes_matter<T: HasherExt>(hasher: impl Fn() -> T) {
}
}
-fn test_no_pair_collisions<T: HasherExt>(hasher: impl Fn() -> T) {
+fn test_no_pair_collisions<T: Hasher>(hasher: impl Fn() -> T) {
let base = [0_u64, 0_u64];
let base_hash = hash(&base, &hasher);
for bitpos1 in 0..64 {
@@ -227,11 +226,18 @@ fn test_no_pair_collisions<T: HasherExt>(hasher: impl Fn() -> T) {
}
}
-fn hash<H: Hash, T: HasherExt>(b: &H, hasher: &dyn Fn() -> T) -> u64 {
- H::get_hash(b, hasher())
+fn hash<H: Hash, T: Hasher>(b: &H, hash_builder: &dyn Fn() -> T) -> u64 {
+ let mut hasher = hash_builder();
+ b.hash(&mut hasher);
+ hasher.finish()
}
-fn test_single_bit_flip<T: HasherExt>(hasher: impl Fn() -> T) {
+fn hash_with<H: Hash, T: Hasher>(b: &H, mut hasher: T) -> u64 {
+ b.hash(&mut hasher);
+ hasher.finish()
+}
+
+fn test_single_bit_flip<T: Hasher>(hasher: impl Fn() -> T) {
let size = 32;
let compare_value = hash(&0u32, &hasher);
for pos in 0..size {
@@ -267,11 +273,11 @@ fn test_padding_doesnot_collide<T: Hasher>(hasher: impl Fn() -> T) {
let (same_bytes, same_nibbles) = count_same_bytes_and_nibbles(value, long.finish());
assert!(
same_bytes <= 3,
- format!("{} bytes of {} -> {:x} vs {:x}", num, c, value, long.finish())
+ "{} bytes of {} -> {:x} vs {:x}", num, c, value, long.finish()
);
assert!(
same_nibbles <= 8,
- format!("{} bytes of {} -> {:x} vs {:x}", num, c, value, long.finish())
+ "{} bytes of {} -> {:x} vs {:x}", num, c, value, long.finish()
);
let flipped_bits = (value ^ long.finish()).count_ones();
assert!(flipped_bits > 10);
@@ -286,25 +292,21 @@ fn test_padding_doesnot_collide<T: Hasher>(hasher: impl Fn() -> T) {
let (same_bytes, same_nibbles) = count_same_bytes_and_nibbles(value, long.finish());
assert!(
same_bytes <= 3,
- format!(
- "string {:?} + {} bytes of {} -> {:x} vs {:x}",
- string,
- num,
- c,
- value,
- long.finish()
- )
+ "string {:?} + {} bytes of {} -> {:x} vs {:x}",
+ string,
+ num,
+ c,
+ value,
+ long.finish()
);
assert!(
same_nibbles <= 8,
- format!(
- "string {:?} + {} bytes of {} -> {:x} vs {:x}",
- string,
- num,
- c,
- value,
- long.finish()
- )
+ "string {:?} + {} bytes of {} -> {:x} vs {:x}",
+ string,
+ num,
+ c,
+ value,
+ long.finish()
);
let flipped_bits = (value ^ long.finish()).count_ones();
assert!(flipped_bits > 10);
@@ -314,6 +316,16 @@ fn test_padding_doesnot_collide<T: Hasher>(hasher: impl Fn() -> T) {
}
}
+fn test_length_extension<T: Hasher>(hasher: impl Fn(u128, u128) -> T) {
+ for key in 0..256 {
+ let h1 = hasher(key, key);
+ let v1 = hash_with(&[0_u8, 0, 0, 0, 0, 0, 0, 0], h1);
+ let h2 = hasher(key, key);
+ let v2 = hash_with(&[1_u8, 0, 0, 0, 0, 0, 0, 0, 0], h2);
+ assert_ne!(v1, v2);
+ }
+}
+
#[cfg(test)]
mod fallback_tests {
use crate::fallback_hash::*;
@@ -341,7 +353,7 @@ mod fallback_tests {
#[test]
fn fallback_test_no_full_collisions() {
- test_no_full_collisions(|| AHasher::new_with_keys(12345, 67890));
+ test_no_full_collisions(|| AHasher::new_with_keys(0, 0));
}
#[test]
@@ -357,15 +369,15 @@ mod fallback_tests {
#[test]
fn fallback_keys_affect_every_byte() {
//For fallback second key is not used in every hash.
- #[cfg(not(feature = "specialize"))]
- test_keys_affect_every_byte(0, |a, b| AHasher::new_with_keys(a ^ b, a));
+ #[cfg(all(not(feature = "specialize"), feature = "folded_multiply"))]
+ test_keys_affect_every_byte(0, |a, b| AHasher::new_with_keys(a ^ b, a));
test_keys_affect_every_byte("", |a, b| AHasher::new_with_keys(a ^ b, a));
test_keys_affect_every_byte((0, 0), |a, b| AHasher::new_with_keys(a ^ b, a));
}
#[test]
fn fallback_finish_is_consistant() {
- test_finish_is_consistent(AHasher::new_with_keys)
+ test_finish_is_consistent(AHasher::test_with_keys)
}
#[test]
@@ -375,81 +387,97 @@ mod fallback_tests {
test_padding_doesnot_collide(|| AHasher::new_with_keys(2, 0));
test_padding_doesnot_collide(|| AHasher::new_with_keys(2, 2));
}
+
+ #[test]
+ fn fallback_length_extension() {
+ test_length_extension(|a, b| AHasher::new_with_keys(a, b));
+ }
}
///Basic sanity tests of the cypto properties of aHash.
-#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)))]
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
#[cfg(test)]
mod aes_tests {
use crate::aes_hash::*;
use crate::hash_quality_test::*;
use std::hash::{Hash, Hasher};
- const BAD_KEY: u128 = 0x5252_5252_5252_5252_5252_5252_5252_5252; //This encrypts to 0.
- const BAD_KEY2: u128 = 0x6363_6363_6363_6363_6363_6363_6363_6363; //This decrypts to 0.
+ //This encrypts to 0.
+ const BAD_KEY2: u128 = 0x6363_6363_6363_6363_6363_6363_6363_6363;
+ //This decrypts to 0.
+ const BAD_KEY: u128 = 0x5252_5252_5252_5252_5252_5252_5252_5252;
#[test]
fn test_single_bit_in_byte() {
- let mut hasher1 = AHasher::new_with_keys(0, 0);
+ let mut hasher1 = AHasher::test_with_keys(0, 0);
8_u32.hash(&mut hasher1);
- let mut hasher2 = AHasher::new_with_keys(0, 0);
+ let mut hasher2 = AHasher::test_with_keys(0, 0);
0_u32.hash(&mut hasher2);
assert_sufficiently_different(hasher1.finish(), hasher2.finish(), 1);
}
#[test]
fn aes_single_bit_flip() {
- test_single_bit_flip(|| AHasher::new_with_keys(BAD_KEY, BAD_KEY));
- test_single_bit_flip(|| AHasher::new_with_keys(BAD_KEY2, BAD_KEY2));
+ test_single_bit_flip(|| AHasher::test_with_keys(BAD_KEY, BAD_KEY));
+ test_single_bit_flip(|| AHasher::test_with_keys(BAD_KEY2, BAD_KEY2));
}
#[test]
fn aes_single_key_bit_flip() {
- test_single_key_bit_flip(AHasher::new_with_keys)
+ test_single_key_bit_flip(AHasher::test_with_keys)
}
#[test]
fn aes_all_bytes_matter() {
- test_all_bytes_matter(|| AHasher::new_with_keys(BAD_KEY, BAD_KEY));
- test_all_bytes_matter(|| AHasher::new_with_keys(BAD_KEY2, BAD_KEY2));
+ test_all_bytes_matter(|| AHasher::test_with_keys(BAD_KEY, BAD_KEY));
+ test_all_bytes_matter(|| AHasher::test_with_keys(BAD_KEY2, BAD_KEY2));
}
#[test]
fn aes_test_no_pair_collisions() {
- test_no_pair_collisions(|| AHasher::new_with_keys(BAD_KEY, BAD_KEY));
- test_no_pair_collisions(|| AHasher::new_with_keys(BAD_KEY2, BAD_KEY2));
+ test_no_pair_collisions(|| AHasher::test_with_keys(BAD_KEY, BAD_KEY));
+ test_no_pair_collisions(|| AHasher::test_with_keys(BAD_KEY2, BAD_KEY2));
}
#[test]
fn ase_test_no_full_collisions() {
- test_no_full_collisions(|| AHasher::new_with_keys(12345, 67890));
+ test_no_full_collisions(|| AHasher::test_with_keys(12345, 67890));
}
#[test]
fn aes_keys_change_output() {
- test_keys_change_output(AHasher::new_with_keys);
+ test_keys_change_output(AHasher::test_with_keys);
}
#[test]
fn aes_input_affect_every_byte() {
- test_input_affect_every_byte(AHasher::new_with_keys);
+ test_input_affect_every_byte(AHasher::test_with_keys);
}
#[test]
fn aes_keys_affect_every_byte() {
#[cfg(not(feature = "specialize"))]
- test_keys_affect_every_byte(0, AHasher::new_with_keys);
- test_keys_affect_every_byte("", AHasher::new_with_keys);
- test_keys_affect_every_byte((0, 0), AHasher::new_with_keys);
+ test_keys_affect_every_byte(0, AHasher::test_with_keys);
+ test_keys_affect_every_byte("", AHasher::test_with_keys);
+ test_keys_affect_every_byte((0, 0), AHasher::test_with_keys);
}
+
#[test]
fn aes_finish_is_consistant() {
- test_finish_is_consistent(AHasher::new_with_keys)
+ test_finish_is_consistent(AHasher::test_with_keys)
}
#[test]
fn aes_padding_doesnot_collide() {
- test_padding_doesnot_collide(|| AHasher::new_with_keys(BAD_KEY, BAD_KEY));
- test_padding_doesnot_collide(|| AHasher::new_with_keys(BAD_KEY2, BAD_KEY2));
+ test_padding_doesnot_collide(|| AHasher::test_with_keys(BAD_KEY, BAD_KEY));
+ test_padding_doesnot_collide(|| AHasher::test_with_keys(BAD_KEY2, BAD_KEY2));
+ }
+
+ #[test]
+ fn aes_length_extension() {
+ test_length_extension(|a, b| AHasher::test_with_keys(a, b));
}
}
diff --git a/src/hash_set.rs b/src/hash_set.rs
index b8331ff..9766b67 100644
--- a/src/hash_set.rs
+++ b/src/hash_set.rs
@@ -1,4 +1,4 @@
-use crate::{RandomState};
+use crate::RandomState;
use std::collections::{hash_set, HashSet};
use std::fmt::{self, Debug};
use std::hash::{BuildHasher, Hash};
@@ -7,11 +7,10 @@ use std::ops::{BitAnd, BitOr, BitXor, Deref, DerefMut, Sub};
#[cfg(feature = "serde")]
use serde::{
- ser::{Serialize, Serializer},
de::{Deserialize, Deserializer},
+ ser::{Serialize, Serializer},
};
-
/// A [`HashSet`](std::collections::HashSet) using [`RandomState`](crate::RandomState) to hash the items.
/// (Requires the `std` feature to be enabled.)
#[derive(Clone)]
@@ -39,8 +38,10 @@ impl<T> AHashSet<T, RandomState> {
}
}
-impl<T, S> AHashSet<T, S> where S: BuildHasher {
-
+impl<T, S> AHashSet<T, S>
+where
+ S: BuildHasher,
+{
pub fn with_hasher(hash_builder: S) -> Self {
AHashSet(HashSet::with_hasher(hash_builder))
}
@@ -276,8 +277,9 @@ impl<T> Default for AHashSet<T, RandomState> {
}
#[cfg(feature = "serde")]
-impl<T> Serialize for AHashSet<T>
-where T: Serialize + Eq + Hash,
+impl<T> Serialize for AHashSet<T>
+where
+ T: Serialize + Eq + Hash,
{
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
self.deref().serialize(serializer)
@@ -285,11 +287,12 @@ where T: Serialize + Eq + Hash,
}
#[cfg(feature = "serde")]
-impl<'de, T> Deserialize<'de> for AHashSet<T>
-where T: Deserialize<'de> + Eq + Hash,
+impl<'de, T> Deserialize<'de> for AHashSet<T>
+where
+ T: Deserialize<'de> + Eq + Hash,
{
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
- let hash_set = HashSet::deserialize(deserializer);
+ let hash_set = HashSet::deserialize(deserializer);
hash_set.map(|hash_set| Self(hash_set))
}
}
diff --git a/src/lib.rs b/src/lib.rs
index a0df5d5..9964a7c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -30,28 +30,38 @@
#![allow(clippy::pedantic, clippy::cast_lossless, clippy::unreadable_literal)]
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
#![cfg_attr(feature = "specialize", feature(min_specialization))]
+#![cfg_attr(feature = "stdsimd", feature(stdsimd))]
#[macro_use]
mod convert;
-#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)))]
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
mod aes_hash;
mod fallback_hash;
#[cfg(test)]
mod hash_quality_test;
-mod operations;
#[cfg(feature = "std")]
mod hash_map;
#[cfg(feature = "std")]
mod hash_set;
+mod operations;
mod random_state;
mod specialize;
-#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)))]
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
pub use crate::aes_hash::AHasher;
-#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri))))]
+#[cfg(not(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+)))]
pub use crate::fallback_hash::AHasher;
pub use crate::random_state::RandomState;
@@ -61,8 +71,9 @@ pub use crate::specialize::CallHasher;
pub use crate::hash_map::AHashMap;
#[cfg(feature = "std")]
pub use crate::hash_set::AHashSet;
-use core::hash::Hasher;
use core::hash::BuildHasher;
+use core::hash::Hash;
+use core::hash::Hasher;
/// Provides a default [Hasher] with fixed keys.
/// This is typically used in conjunction with [BuildHasherDefault] to create
@@ -86,16 +97,15 @@ use core::hash::BuildHasher;
/// [Hasher]: std::hash::Hasher
/// [HashMap]: std::collections::HashMap
impl Default for AHasher {
-
/// Constructs a new [AHasher] with fixed keys.
/// If `std` is enabled these will be generated upon first invocation.
/// Otherwise if the `compile-time-rng`feature is enabled these will be generated at compile time.
/// If neither of these features are available, hardcoded constants will be used.
- ///
+ ///
/// Because the values are fixed, different hashers will all hash elements the same way.
/// This could make hash values predictable, if DOS attacks are a concern. If this behaviour is
/// not required, it may be preferable to use [RandomState] instead.
- ///
+ ///
/// # Examples
///
/// ```
@@ -117,46 +127,67 @@ impl Default for AHasher {
}
/// Used for specialization. (Sealed)
-pub(crate) trait HasherExt: Hasher {
+pub(crate) trait BuildHasherExt: BuildHasher {
#[doc(hidden)]
- fn hash_u64(self, value: u64) -> u64;
+ fn hash_as_u64<T: Hash + ?Sized>(&self, value: &T) -> u64;
#[doc(hidden)]
- fn short_finish(&self) -> u64;
+ fn hash_as_fixed_length<T: Hash + ?Sized>(&self, value: &T) -> u64;
+
+ #[doc(hidden)]
+ fn hash_as_str<T: Hash + ?Sized>(&self, value: &T) -> u64;
}
-impl<T: Hasher> HasherExt for T {
+impl<B: BuildHasher> BuildHasherExt for B {
#[inline]
#[cfg(feature = "specialize")]
- default fn hash_u64(mut self, value: u64) -> u64 {
- use core::hash::Hash;
- value.hash(&mut self);
- self.finish()
+ default fn hash_as_u64<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = self.build_hasher();
+ value.hash(&mut hasher);
+ hasher.finish()
}
#[inline]
#[cfg(not(feature = "specialize"))]
- fn hash_u64(mut self, value: u64) -> u64 {
- use core::hash::Hash;
- value.hash(&mut self);
- self.finish()
+ fn hash_as_u64<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = self.build_hasher();
+ value.hash(&mut hasher);
+ hasher.finish()
}
#[inline]
#[cfg(feature = "specialize")]
- default fn short_finish(&self) -> u64 {
- self.finish()
+ default fn hash_as_fixed_length<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = self.build_hasher();
+ value.hash(&mut hasher);
+ hasher.finish()
}
#[inline]
#[cfg(not(feature = "specialize"))]
- fn short_finish(&self) -> u64 {
- self.finish()
+ fn hash_as_fixed_length<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = self.build_hasher();
+ value.hash(&mut hasher);
+ hasher.finish()
+ }
+ #[inline]
+ #[cfg(feature = "specialize")]
+ default fn hash_as_str<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = self.build_hasher();
+ value.hash(&mut hasher);
+ hasher.finish()
+ }
+ #[inline]
+ #[cfg(not(feature = "specialize"))]
+ fn hash_as_str<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = self.build_hasher();
+ value.hash(&mut hasher);
+ hasher.finish()
}
}
// #[inline(never)]
// #[doc(hidden)]
// pub fn hash_test(input: &[u8]) -> u64 {
-// let a = AHasher::new_with_keys(11111111111_u128, 2222222222_u128);
-// input.get_hash(a)
+// let a = RandomState::with_seeds(11, 22, 33, 44);
+// <[u8]>::get_hash(input, &a)
// }
#[cfg(feature = "std")]
@@ -165,6 +196,7 @@ mod test {
use crate::convert::Convert;
use crate::*;
use std::collections::HashMap;
+ use std::hash::Hash;
#[test]
fn test_default_builder() {
@@ -187,6 +219,43 @@ mod test {
assert_eq!(bytes, 0x6464646464646464);
}
+
+ #[test]
+ fn test_non_zero() {
+ let mut hasher1 = AHasher::new_with_keys(0, 0);
+ let mut hasher2 = AHasher::new_with_keys(0, 0);
+ "foo".hash(&mut hasher1);
+ "bar".hash(&mut hasher2);
+ assert_ne!(hasher1.finish(), 0);
+ assert_ne!(hasher2.finish(), 0);
+ assert_ne!(hasher1.finish(), hasher2.finish());
+
+ let mut hasher1 = AHasher::new_with_keys(0, 0);
+ let mut hasher2 = AHasher::new_with_keys(0, 0);
+ 3_u64.hash(&mut hasher1);
+ 4_u64.hash(&mut hasher2);
+ assert_ne!(hasher1.finish(), 0);
+ assert_ne!(hasher2.finish(), 0);
+ assert_ne!(hasher1.finish(), hasher2.finish());
+ }
+
+ #[test]
+ fn test_non_zero_specialized() {
+ let hasher_build = RandomState::with_seeds(0,0,0,0);
+
+ let h1 = str::get_hash("foo", &hasher_build);
+ let h2 = str::get_hash("bar", &hasher_build);
+ assert_ne!(h1, 0);
+ assert_ne!(h2, 0);
+ assert_ne!(h1, h2);
+
+ let h1 = u64::get_hash(&3_u64, &hasher_build);
+ let h2 = u64::get_hash(&4_u64, &hasher_build);
+ assert_ne!(h1, 0);
+ assert_ne!(h2, 0);
+ assert_ne!(h1, h2);
+ }
+
#[test]
fn test_ahasher_construction() {
let _ = AHasher::new_with_keys(1234, 5678);
diff --git a/src/operations.rs b/src/operations.rs
index 0646c44..b71fd5a 100644
--- a/src/operations.rs
+++ b/src/operations.rs
@@ -7,28 +7,50 @@ const SHUFFLE_MASK: u128 = 0x020a0700_0c01030e_050f0d08_06090b04_u128;
//const SHUFFLE_MASK: u128 = 0x000d0702_0a040301_05080f0c_0e0b0609_u128;
//const SHUFFLE_MASK: u128 = 0x040A0700_030E0106_0D050F08_020B0C09_u128;
+#[inline(always)]
pub(crate) const fn folded_multiply(s: u64, by: u64) -> u64 {
let result = (s as u128).wrapping_mul(by as u128);
((result & 0xffff_ffff_ffff_ffff) as u64) ^ ((result >> 64) as u64)
}
+
+/// Given a small (less than 8 byte slice) returns the same data stored in two u32s.
+/// (order of and non-duplication of bytes is NOT guaranteed)
+#[inline(always)]
+pub(crate) fn read_small(data: &[u8]) -> [u64; 2] {
+ debug_assert!(data.len() <= 8);
+ if data.len() >= 2 {
+ if data.len() >= 4 {
+ //len 4-8
+ [data.read_u32().0 as u64, data.read_last_u32() as u64]
+ } else {
+ //len 2-3
+ [data.read_u16().0 as u64, data[data.len() - 1] as u64]
+ }
+ } else {
+ if data.len() > 0 {
+ [data[0] as u64, data[0] as u64]
+ } else {
+ [0, 0]
+ }
+ }
+}
+
#[inline(always)]
pub(crate) fn shuffle(a: u128) -> u128 {
#[cfg(all(target_feature = "ssse3", not(miri)))]
- {
- use core::mem::transmute;
- #[cfg(target_arch = "x86")]
- use core::arch::x86::*;
- #[cfg(target_arch = "x86_64")]
- use core::arch::x86_64::*;
- unsafe {
- transmute(_mm_shuffle_epi8(transmute(a), transmute(SHUFFLE_MASK)))
- }
- }
+ {
+ #[cfg(target_arch = "x86")]
+ use core::arch::x86::*;
+ #[cfg(target_arch = "x86_64")]
+ use core::arch::x86_64::*;
+ use core::mem::transmute;
+ unsafe { transmute(_mm_shuffle_epi8(transmute(a), transmute(SHUFFLE_MASK))) }
+ }
#[cfg(not(all(target_feature = "ssse3", not(miri))))]
- {
- a.swap_bytes()
- }
+ {
+ a.swap_bytes()
+ }
}
#[allow(unused)] //not used by fallback
@@ -78,6 +100,22 @@ pub(crate) fn aesenc(value: u128, xor: u128) -> u128 {
transmute(_mm_aesenc_si128(value, transmute(xor)))
}
}
+
+#[cfg(all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd"))]
+#[allow(unused)]
+#[inline(always)]
+pub(crate) fn aesenc(value: u128, xor: u128) -> u128 {
+ #[cfg(target_arch = "arm")]
+ use core::arch::arm::*;
+ #[cfg(target_arch = "aarch64")]
+ use core::arch::aarch64::*;
+ use core::mem::transmute;
+ unsafe {
+ let value = transmute(value);
+ transmute(vaesmcq_u8(vaeseq_u8(value, transmute(xor))))
+ }
+}
+
#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)))]
#[allow(unused)]
#[inline(always)]
@@ -93,6 +131,21 @@ pub(crate) fn aesdec(value: u128, xor: u128) -> u128 {
}
}
+#[cfg(all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd"))]
+#[allow(unused)]
+#[inline(always)]
+pub(crate) fn aesdec(value: u128, xor: u128) -> u128 {
+ #[cfg(target_arch = "arm")]
+ use core::arch::arm::*;
+ #[cfg(target_arch = "aarch64")]
+ use core::arch::aarch64::*;
+ use core::mem::transmute;
+ unsafe {
+ let value = transmute(value);
+ transmute(vaesimcq_u8(vaesdq_u8(value, transmute(xor))))
+ }
+}
+
#[cfg(test)]
mod test {
use super::*;
diff --git a/src/random_state.rs b/src/random_state.rs
index 9b3b3d0..835467c 100644
--- a/src/random_state.rs
+++ b/src/random_state.rs
@@ -1,14 +1,52 @@
#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
use crate::convert::Convert;
-use crate::{AHasher};
+#[cfg(feature = "specialize")]
+use crate::BuildHasherExt;
+
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
+pub use crate::aes_hash::*;
+
+#[cfg(not(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+)))]
+pub use crate::fallback_hash::*;
+
#[cfg(all(feature = "compile-time-rng", any(not(feature = "runtime-rng"), test)))]
use const_random::const_random;
+use core::any::{Any, TypeId};
use core::fmt;
use core::hash::BuildHasher;
+#[cfg(feature = "specialize")]
+use core::hash::Hash;
use core::hash::Hasher;
-#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
-use lazy_static::*;
+
+#[cfg(not(feature = "std"))]
+extern crate alloc;
+#[cfg(feature = "std")]
+extern crate std as alloc;
+
+use alloc::boxed::Box;
use core::sync::atomic::{AtomicUsize, Ordering};
+#[cfg(not(all(target_arch = "arm", target_os = "none")))]
+use once_cell::race::OnceBox;
+
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
+use crate::aes_hash::*;
+#[cfg(not(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+)))]
+use crate::fallback_hash::*;
+
+#[cfg(not(all(target_arch = "arm", target_os = "none")))]
+static RAND_SOURCE: OnceBox<Box<dyn RandomSource + Send + Sync>> = OnceBox::new();
#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
fn read_urandom(dest: &mut [u8]) -> Result<(), std::io::Error> {
@@ -19,18 +57,15 @@ fn read_urandom(dest: &mut [u8]) -> Result<(), std::io::Error> {
f.read_exact(dest)
}
-#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
-lazy_static! {
- static ref SEEDS: [[u64; 4]; 2] = {
- let mut result: [u8; 64] = [0; 64];
- if read_urandom(&mut result).is_err() {
- getrandom::getrandom(&mut result).expect("getrandom::getrandom() failed.")
- }
- result.convert()
- };
-}
+/// A supplier of Randomness used for different hashers.
+/// See [RandomState.set_random_source].
+pub trait RandomSource {
+
+ fn get_fixed_seeds(&self) -> &'static [[u64; 4]; 2];
-static COUNTER: AtomicUsize = AtomicUsize::new(0);
+ fn gen_hasher_seed(&self) -> usize;
+
+}
pub(crate) const PI: [u64; 4] = [
0x243f_6a88_85a3_08d3,
@@ -39,24 +74,84 @@ pub(crate) const PI: [u64; 4] = [
0x082e_fa98_ec4e_6c89,
];
-#[cfg(all(not(feature = "runtime-rng"), not(feature = "compile-time-rng")))]
-const PI2: [u64; 4] = [
+pub(crate) const PI2: [u64; 4] = [
0x4528_21e6_38d0_1377,
0xbe54_66cf_34e9_0c6c,
0xc0ac_29b7_c97c_50dd,
0x3f84_d5b5_b547_0917,
];
-#[inline]
-pub(crate) fn seeds() -> [u64; 4] {
+struct DefaultRandomSource {
+ counter: AtomicUsize,
+}
+
+impl DefaultRandomSource {
+ fn new() -> DefaultRandomSource {
+ DefaultRandomSource {
+ counter: AtomicUsize::new(&PI as *const _ as usize),
+ }
+ }
+
+ const fn default() -> DefaultRandomSource {
+ DefaultRandomSource {
+ counter: AtomicUsize::new(PI[3] as usize),
+ }
+ }
+}
+
+impl RandomSource for DefaultRandomSource {
+
#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
- { SEEDS[1] }
+ fn get_fixed_seeds(&self) -> &'static [[u64; 4]; 2] {
+ static SEEDS: OnceBox<[[u64; 4]; 2]> = OnceBox::new();
+
+ SEEDS.get_or_init(|| {
+ let mut result: [u8; 64] = [0; 64];
+ if read_urandom(&mut result).is_err() {
+ getrandom::getrandom(&mut result).expect("getrandom::getrandom() failed.");
+ }
+ Box::new(result.convert())
+ })
+ }
+
#[cfg(all(feature = "compile-time-rng", any(not(feature = "runtime-rng"), test)))]
- { [const_random!(u64), const_random!(u64), const_random!(u64), const_random!(u64)] }
+ fn get_fixed_seeds(&self) -> &'static [[u64; 4]; 2] {
+ const RAND: [[u64; 4]; 2] = [
+ [
+ const_random!(u64),
+ const_random!(u64),
+ const_random!(u64),
+ const_random!(u64),
+ ], [
+ const_random!(u64),
+ const_random!(u64),
+ const_random!(u64),
+ const_random!(u64),
+ ]
+ ];
+ &RAND
+ }
+
#[cfg(all(not(feature = "runtime-rng"), not(feature = "compile-time-rng")))]
- { PI }
-}
+ fn get_fixed_seeds(&self) -> &'static [[u64; 4]; 2] {
+ &[PI, PI2]
+ }
+ #[cfg(not(all(target_arch = "arm", target_os = "none")))]
+ fn gen_hasher_seed(&self) -> usize {
+ let stack = self as *const _ as usize;
+ self.counter.fetch_add(stack, Ordering::Relaxed)
+ }
+
+ #[cfg(all(target_arch = "arm", target_os = "none"))]
+ fn gen_hasher_seed(&self) -> usize {
+ let stack = self as *const _ as usize;
+ let previous = self.counter.load(Ordering::Relaxed);
+ let new = previous.wrapping_add(stack);
+ self.counter.store(new, Ordering::Relaxed);
+ new
+ }
+}
/// Provides a [Hasher] factory. This is typically used (e.g. by [HashMap]) to create
/// [AHasher]s in order to hash the keys of the map. See `build_hasher` below.
@@ -80,72 +175,90 @@ impl fmt::Debug for RandomState {
}
impl RandomState {
+
+ /// Provides an optional way to manually supply a source of randomness for Hasher keys.
+ ///
+ /// The provided [RandomSource] will be used to be used as a source of randomness by [RandomState] to generate new states.
+ /// If this method is not invoked the standard source of randomness is used as described in the Readme.
+ ///
+ /// The source of randomness can only be set once, and must be set before the first RandomState is created.
+ /// If the source has already been specified `Err` is returned with a `bool` indicating if the set failed because
+ /// method was previously invoked (true) or if the default source is already being used (false).
+ #[cfg(not(all(target_arch = "arm", target_os = "none")))]
+ pub fn set_random_source(source: impl RandomSource + Send + Sync + 'static) -> Result<(), bool> {
+ RAND_SOURCE.set(Box::new(Box::new(source))).map_err(|s| s.as_ref().type_id() != TypeId::of::<&DefaultRandomSource>())
+ }
+
+ #[inline]
+ #[cfg(not(all(target_arch = "arm", target_os = "none")))]
+ fn get_src() -> &'static dyn RandomSource {
+ RAND_SOURCE.get_or_init(|| Box::new(Box::new(DefaultRandomSource::new()))).as_ref()
+ }
+
+ #[inline]
+ #[cfg(all(target_arch = "arm", target_os = "none"))]
+ fn get_src() -> &'static dyn RandomSource {
+ static RAND_SOURCE: DefaultRandomSource = DefaultRandomSource::default();
+ &RAND_SOURCE
+ }
+
/// Use randomly generated keys
#[inline]
pub fn new() -> RandomState {
- #[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
- {
- let seeds = *SEEDS;
- RandomState::from_keys(seeds[0], seeds[1])
- }
- #[cfg(all(feature = "compile-time-rng", any(not(feature = "runtime-rng"), test)))]
- {
- RandomState::from_keys(
- [const_random!(u64), const_random!(u64), const_random!(u64), const_random!(u64)],
- [const_random!(u64), const_random!(u64), const_random!(u64), const_random!(u64)],
- )
- }
- #[cfg(all(not(feature = "runtime-rng"), not(feature = "compile-time-rng")))]
- {
- RandomState::from_keys(PI, PI2)
- }
+ let src = Self::get_src();
+ let fixed = src.get_fixed_seeds();
+ Self::from_keys(&fixed[0], &fixed[1], src.gen_hasher_seed())
}
/// Allows for supplying seeds, but each time it is called the resulting state will be different.
/// This is done using a static counter, so it can safely be used with a fixed keys.
#[inline]
pub fn generate_with(k0: u64, k1: u64, k2: u64, k3: u64) -> RandomState {
- RandomState::from_keys(seeds(), [k0, k1, k2, k3])
+ let src = Self::get_src();
+ let fixed = src.get_fixed_seeds();
+ RandomState::from_keys(&fixed[0], &[k0, k1, k2, k3], src.gen_hasher_seed())
}
- fn from_keys(a: [u64; 4], b: [u64; 4]) -> RandomState {
- let [k0, k1, k2, k3] = a;
+ fn from_keys(a: &[u64; 4], b: &[u64; 4], c: usize) -> RandomState {
+ let &[k0, k1, k2, k3] = a;
let mut hasher = AHasher::from_random_state(&RandomState { k0, k1, k2, k3 });
-
- let stack_mem_loc = &hasher as *const _ as usize;
- #[cfg(not(all(target_arch="arm", target_os="none")))]
- {
- hasher.write_usize(COUNTER.fetch_add(stack_mem_loc, Ordering::Relaxed));
- }
- #[cfg(all(target_arch="arm", target_os="none"))]
- {
- let previous = COUNTER.load(Ordering::Relaxed);
- let new = previous.wrapping_add(stack_mem_loc);
- COUNTER.store(new, Ordering::Relaxed);
- hasher.write_usize(new);
- }
- #[cfg(all(not(feature = "runtime-rng"), not(feature = "compile-time-rng")))]
- hasher.write_usize(&PI as *const _ as usize);
+ hasher.write_usize(c);
let mix = |k: u64| {
let mut h = hasher.clone();
h.write_u64(k);
h.finish()
};
-
- RandomState { k0: mix(b[0]), k1: mix(b[1]), k2: mix(b[2]), k3: mix(b[3]) }
+ RandomState {
+ k0: mix(b[0]),
+ k1: mix(b[1]),
+ k2: mix(b[2]),
+ k3: mix(b[3]),
+ }
}
/// Internal. Used by Default.
#[inline]
pub(crate) fn with_fixed_keys() -> RandomState {
- let [k0, k1, k2, k3] = seeds();
+ let [k0, k1, k2, k3] = Self::get_src().get_fixed_seeds()[0];
RandomState { k0, k1, k2, k3 }
}
+ /// Allows for explicitly setting a seed to used.
+ ///
+ /// Note: This method does not require the provided seed to be strong.
+ #[inline]
+ pub fn with_seed(key: usize) -> RandomState {
+ let fixed = Self::get_src().get_fixed_seeds();
+ RandomState::from_keys(&fixed[0], &fixed[1], key)
+ }
+
/// Allows for explicitly setting the seeds to used.
+ ///
+ /// Note: This method is robust against 0s being passed for one or more of the parameters
+ /// or the same value being passed for more than one parameter.
#[inline]
pub const fn with_seeds(k0: u64, k1: u64, k2: u64, k3: u64) -> RandomState {
- RandomState { k0, k1, k2, k3 }
+ RandomState { k0: k0 ^ PI2[0], k1: k1 ^ PI2[1], k2: k2 ^ PI2[2], k3: k3 ^ PI2[3] }
}
}
@@ -193,6 +306,33 @@ impl BuildHasher for RandomState {
}
}
+#[cfg(feature = "specialize")]
+impl BuildHasherExt for RandomState {
+ #[inline]
+ fn hash_as_u64<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = AHasherU64 {
+ buffer: self.k0,
+ pad: self.k1,
+ };
+ value.hash(&mut hasher);
+ hasher.finish()
+ }
+
+ #[inline]
+ fn hash_as_fixed_length<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = AHasherFixed(self.build_hasher());
+ value.hash(&mut hasher);
+ hasher.finish()
+ }
+
+ #[inline]
+ fn hash_as_str<T: Hash + ?Sized>(&self, value: &T) -> u64 {
+ let mut hasher = AHasherStr(self.build_hasher());
+ value.hash(&mut hasher);
+ hasher.finish()
+ }
+}
+
#[cfg(test)]
mod test {
use super::*;
@@ -207,19 +347,19 @@ mod test {
#[cfg(all(feature = "runtime-rng", not(all(feature = "compile-time-rng", test))))]
#[test]
fn test_not_pi() {
- assert_ne!(PI, seeds());
+ assert_ne!(PI, RandomState::get_src().get_fixed_seeds()[0]);
}
#[cfg(all(feature = "compile-time-rng", any(not(feature = "runtime-rng"), test)))]
#[test]
fn test_not_pi_const() {
- assert_ne!(PI, seeds());
+ assert_ne!(PI, RandomState::get_src().get_fixed_seeds()[0]);
}
#[cfg(all(not(feature = "runtime-rng"), not(feature = "compile-time-rng")))]
#[test]
fn test_pi() {
- assert_eq!(PI, seeds());
+ assert_eq!(PI, RandomState::get_src().get_fixed_seeds()[0]);
}
#[test]
diff --git a/src/specialize.rs b/src/specialize.rs
index 0d9095a..d94a4ee 100644
--- a/src/specialize.rs
+++ b/src/specialize.rs
@@ -1,5 +1,4 @@
-#[cfg(feature = "specialize")]
-use crate::HasherExt;
+use core::hash::BuildHasher;
use core::hash::Hash;
use core::hash::Hasher;
@@ -9,13 +8,15 @@ extern crate alloc;
extern crate std as alloc;
#[cfg(feature = "specialize")]
+use crate::BuildHasherExt;
+#[cfg(feature = "specialize")]
use alloc::string::String;
#[cfg(feature = "specialize")]
use alloc::vec::Vec;
/// Provides a way to get an optimized hasher for a given data type.
/// Rather than using a Hasher generically which can hash any value, this provides a way to get a specialized hash
-/// for a specific type. So this may be faster for primitive types. It does however consume the hasher in the process.
+/// for a specific type. So this may be faster for primitive types.
/// # Example
/// ```
/// use std::hash::BuildHasher;
@@ -24,11 +25,21 @@ use alloc::vec::Vec;
///
/// let hash_builder = RandomState::new();
/// //...
-/// let value = 17;
-/// let hash = u32::get_hash(&value, hash_builder.build_hasher());
+/// let value: u32 = 17;
+/// let hash = u32::get_hash(&value, &hash_builder);
+/// ```
+/// Note that the type used to invoke `get_hash` must be the same a the type of value passed.
+/// For example get a hasher specialized on `[u8]` can invoke:
+/// ```
+/// /// use std::hash::BuildHasher;
+/// # use ahash::RandomState;
+/// # use ahash::CallHasher;
+/// # let hash_builder = RandomState::new();
+/// let bytes: [u8; 4] = [1, 2, 3, 4];
+/// let hash = <[u8]>::get_hash(&bytes, &hash_builder);
/// ```
pub trait CallHasher {
- fn get_hash<H: Hasher>(value: &Self, hasher: H) -> u64;
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64;
}
#[cfg(not(feature = "specialize"))]
@@ -37,7 +48,8 @@ where
T: Hash + ?Sized,
{
#[inline]
- fn get_hash<H: Hasher>(value: &T, mut hasher: H) -> u64 {
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ let mut hasher = build_hasher.build_hasher();
value.hash(&mut hasher);
hasher.finish()
}
@@ -49,7 +61,8 @@ where
T: Hash + ?Sized,
{
#[inline]
- default fn get_hash<H: Hasher>(value: &T, mut hasher: H) -> u64 {
+ default fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ let mut hasher = build_hasher.build_hasher();
value.hash(&mut hasher);
hasher.finish()
}
@@ -60,22 +73,8 @@ macro_rules! call_hasher_impl {
#[cfg(feature = "specialize")]
impl CallHasher for $typ {
#[inline]
- fn get_hash<H: Hasher>(value: &$typ, hasher: H) -> u64 {
- hasher.hash_u64(*value as u64)
- }
- }
- #[cfg(feature = "specialize")]
- impl CallHasher for &$typ {
- #[inline]
- fn get_hash<H: Hasher>(value: &&$typ, hasher: H) -> u64 {
- hasher.hash_u64(**value as u64)
- }
- }
- #[cfg(feature = "specialize")]
- impl CallHasher for &&$typ {
- #[inline]
- fn get_hash<H: Hasher>(value: &&&$typ, hasher: H) -> u64 {
- hasher.hash_u64(***value as u64)
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_u64(value)
}
}
};
@@ -92,180 +91,64 @@ call_hasher_impl!(i64);
#[cfg(feature = "specialize")]
impl CallHasher for u128 {
#[inline]
- fn get_hash<H: Hasher>(value: &u128, mut hasher: H) -> u64 {
- hasher.write_u128(*value);
- hasher.short_finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &u128 {
- #[inline]
- fn get_hash<H: Hasher>(value: &&u128, mut hasher: H) -> u64 {
- hasher.write_u128(**value);
- hasher.short_finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &&u128 {
- #[inline]
- fn get_hash<H: Hasher>(value: &&&u128, mut hasher: H) -> u64 {
- hasher.write_u128(***value);
- hasher.short_finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_fixed_length(value)
}
}
#[cfg(feature = "specialize")]
impl CallHasher for i128 {
#[inline]
- fn get_hash<H: Hasher>(value: &i128, mut hasher: H) -> u64 {
- hasher.write_u128(*value as u128);
- hasher.short_finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_fixed_length(value)
}
}
#[cfg(feature = "specialize")]
-impl CallHasher for &i128 {
+impl CallHasher for usize {
#[inline]
- fn get_hash<H: Hasher>(value: &&i128, mut hasher: H) -> u64 {
- hasher.write_u128(**value as u128);
- hasher.short_finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_fixed_length(value)
}
}
#[cfg(feature = "specialize")]
-impl CallHasher for &&i128 {
+impl CallHasher for isize {
#[inline]
- fn get_hash<H: Hasher>(value: &&&i128, mut hasher: H) -> u64 {
- hasher.write_u128(***value as u128);
- hasher.short_finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_fixed_length(value)
}
}
#[cfg(feature = "specialize")]
impl CallHasher for [u8] {
#[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value);
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &[u8] {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(*value);
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &&[u8] {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(**value);
- hasher.finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_str(value)
}
}
#[cfg(feature = "specialize")]
impl CallHasher for Vec<u8> {
#[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value);
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &Vec<u8> {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(*value);
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &&Vec<u8> {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(**value);
- hasher.finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_str(value)
}
}
#[cfg(feature = "specialize")]
impl CallHasher for str {
#[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &str {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &&str {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
- }
-}
-
-#[cfg(feature = "specialize")]
-impl CallHasher for &&&str {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_str(value)
}
}
#[cfg(all(feature = "specialize"))]
impl CallHasher for String {
#[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
- }
-}
-
-#[cfg(all(feature = "specialize"))]
-impl CallHasher for &String {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
- }
-}
-
-#[cfg(all(feature = "specialize"))]
-impl CallHasher for &&String {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
- }
-}
-
-#[cfg(all(feature = "specialize"))]
-impl CallHasher for &&&String {
- #[inline]
- fn get_hash<H: Hasher>(value: &Self, mut hasher: H) -> u64 {
- hasher.write(value.as_bytes());
- hasher.finish()
+ fn get_hash<H: Hash + ?Sized, B: BuildHasher>(value: &H, build_hasher: &B) -> u64 {
+ build_hasher.hash_as_str(value)
}
}
@@ -277,7 +160,8 @@ mod test {
#[test]
#[cfg(feature = "specialize")]
pub fn test_specialized_invoked() {
- let shortened = u64::get_hash(&0, AHasher::new_with_keys(1, 2));
+ let build_hasher = RandomState::with_seeds(1, 2, 3, 4);
+ let shortened = u64::get_hash(&0, &build_hasher);
let mut hasher = AHasher::new_with_keys(1, 2);
0_u64.hash(&mut hasher);
assert_ne!(hasher.finish(), shortened);
@@ -286,22 +170,22 @@ mod test {
/// Tests that some non-trivial transformation takes place.
#[test]
pub fn test_input_processed() {
- let hasher = || AHasher::new_with_keys(3, 2);
- assert_ne!(0, u64::get_hash(&0, hasher()));
- assert_ne!(1, u64::get_hash(&0, hasher()));
- assert_ne!(2, u64::get_hash(&0, hasher()));
- assert_ne!(3, u64::get_hash(&0, hasher()));
- assert_ne!(4, u64::get_hash(&0, hasher()));
- assert_ne!(5, u64::get_hash(&0, hasher()));
-
- assert_ne!(0, u64::get_hash(&1, hasher()));
- assert_ne!(1, u64::get_hash(&1, hasher()));
- assert_ne!(2, u64::get_hash(&1, hasher()));
- assert_ne!(3, u64::get_hash(&1, hasher()));
- assert_ne!(4, u64::get_hash(&1, hasher()));
- assert_ne!(5, u64::get_hash(&1, hasher()));
-
- let xored = u64::get_hash(&0, hasher()) ^ u64::get_hash(&1, hasher());
+ let build_hasher = RandomState::with_seeds(2, 2, 2, 2);
+ assert_ne!(0, u64::get_hash(&0, &build_hasher));
+ assert_ne!(1, u64::get_hash(&0, &build_hasher));
+ assert_ne!(2, u64::get_hash(&0, &build_hasher));
+ assert_ne!(3, u64::get_hash(&0, &build_hasher));
+ assert_ne!(4, u64::get_hash(&0, &build_hasher));
+ assert_ne!(5, u64::get_hash(&0, &build_hasher));
+
+ assert_ne!(0, u64::get_hash(&1, &build_hasher));
+ assert_ne!(1, u64::get_hash(&1, &build_hasher));
+ assert_ne!(2, u64::get_hash(&1, &build_hasher));
+ assert_ne!(3, u64::get_hash(&1, &build_hasher));
+ assert_ne!(4, u64::get_hash(&1, &build_hasher));
+ assert_ne!(5, u64::get_hash(&1, &build_hasher));
+
+ let xored = u64::get_hash(&0, &build_hasher) ^ u64::get_hash(&1, &build_hasher);
assert_ne!(0, xored);
assert_ne!(1, xored);
assert_ne!(2, xored);
@@ -312,26 +196,44 @@ mod test {
#[test]
pub fn test_ref_independent() {
- let hasher = || AHasher::new_with_keys(3, 2);
- assert_eq!(<&u8>::get_hash(&&1, hasher()), u8::get_hash(&1, hasher()));
- assert_eq!(<&u16>::get_hash(&&2, hasher()), u16::get_hash(&2, hasher()));
- assert_eq!(<&u32>::get_hash(&&3, hasher()), u32::get_hash(&3, hasher()));
- assert_eq!(<&u64>::get_hash(&&4, hasher()), u64::get_hash(&4, hasher()));
- assert_eq!(<&u128>::get_hash(&&5, hasher()), u128::get_hash(&5, hasher()));
- assert_eq!(<&str>::get_hash(&"test", hasher()), str::get_hash("test", hasher()));
- assert_eq!(<&str>::get_hash(&"test", hasher()), String::get_hash(&"test".to_string(), hasher()));
+ let build_hasher = RandomState::with_seeds(1, 2, 3, 4);
+ assert_eq!(u8::get_hash(&&1, &build_hasher), u8::get_hash(&1, &build_hasher));
+ assert_eq!(u16::get_hash(&&2, &build_hasher), u16::get_hash(&2, &build_hasher));
+ assert_eq!(u32::get_hash(&&3, &build_hasher), u32::get_hash(&3, &build_hasher));
+ assert_eq!(u64::get_hash(&&4, &build_hasher), u64::get_hash(&4, &build_hasher));
+ assert_eq!(u128::get_hash(&&5, &build_hasher), u128::get_hash(&5, &build_hasher));
+ assert_eq!(
+ str::get_hash(&"test", &build_hasher),
+ str::get_hash("test", &build_hasher)
+ );
+ assert_eq!(
+ str::get_hash(&"test", &build_hasher),
+ String::get_hash(&"test".to_string(), &build_hasher)
+ );
#[cfg(feature = "specialize")]
- assert_eq!(<&str>::get_hash(&"test", hasher()), <[u8]>::get_hash("test".as_bytes(), hasher()));
-
- let hasher = || AHasher::new_with_keys(3, 2);
- assert_eq!(<&&u8>::get_hash(&&&1, hasher()), u8::get_hash(&1, hasher()));
- assert_eq!(<&&u16>::get_hash(&&&2, hasher()), u16::get_hash(&2, hasher()));
- assert_eq!(<&&u32>::get_hash(&&&3, hasher()), u32::get_hash(&3, hasher()));
- assert_eq!(<&&u64>::get_hash(&&&4, hasher()), u64::get_hash(&4, hasher()));
- assert_eq!(<&&u128>::get_hash(&&&5, hasher()), u128::get_hash(&5, hasher()));
- assert_eq!(<&&str>::get_hash(&&"test", hasher()), str::get_hash("test",hasher()));
- assert_eq!(<&&str>::get_hash(&&"test", hasher()), String::get_hash(&"test".to_string(), hasher()));
+ assert_eq!(
+ str::get_hash(&"test", &build_hasher),
+ <[u8]>::get_hash("test".as_bytes(), &build_hasher)
+ );
+
+ let build_hasher = RandomState::with_seeds(10, 20, 30, 40);
+ assert_eq!(u8::get_hash(&&&1, &build_hasher), u8::get_hash(&1, &build_hasher));
+ assert_eq!(u16::get_hash(&&&2, &build_hasher), u16::get_hash(&2, &build_hasher));
+ assert_eq!(u32::get_hash(&&&3, &build_hasher), u32::get_hash(&3, &build_hasher));
+ assert_eq!(u64::get_hash(&&&4, &build_hasher), u64::get_hash(&4, &build_hasher));
+ assert_eq!(u128::get_hash(&&&5, &build_hasher), u128::get_hash(&5, &build_hasher));
+ assert_eq!(
+ str::get_hash(&&"test", &build_hasher),
+ str::get_hash("test", &build_hasher)
+ );
+ assert_eq!(
+ str::get_hash(&&"test", &build_hasher),
+ String::get_hash(&"test".to_string(), &build_hasher)
+ );
#[cfg(feature = "specialize")]
- assert_eq!(<&&str>::get_hash(&&"test", hasher()), <[u8]>::get_hash(&"test".to_string().into_bytes(), hasher()));
+ assert_eq!(
+ str::get_hash(&&"test", &build_hasher),
+ <[u8]>::get_hash(&"test".to_string().into_bytes(), &build_hasher)
+ );
}
}
diff --git a/tests/bench.rs b/tests/bench.rs
index 68591e2..9e6dccc 100644
--- a/tests/bench.rs
+++ b/tests/bench.rs
@@ -2,24 +2,36 @@ use ahash::{CallHasher, RandomState};
use criterion::*;
use fxhash::FxHasher;
use std::collections::hash_map::DefaultHasher;
-use std::hash::{Hash, Hasher, BuildHasher};
+use std::hash::{Hash, Hasher};
-#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes"))]
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
fn aeshash<H: Hash>(b: &H) -> u64 {
- let hasher = RandomState::with_seeds(1, 2, 3, 4).build_hasher();
- H::get_hash(b, hasher)
+ let build_hasher = RandomState::with_seeds(1, 2, 3, 4);
+ H::get_hash(b, &build_hasher)
}
-#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes")))]
+#[cfg(not(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+)))]
fn aeshash<H: Hash>(_b: &H) -> u64 {
panic!("aes must be enabled")
}
-#[cfg(not(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes")))]
+#[cfg(not(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+)))]
fn fallbackhash<H: Hash>(b: &H) -> u64 {
- let hasher = RandomState::with_seeds(1, 2, 3, 4).build_hasher();
- H::get_hash(b, hasher)
+ let build_hasher = RandomState::with_seeds(1, 2, 3, 4);
+ H::get_hash(b, &build_hasher)
}
-#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes"))]
+#[cfg(any(
+ all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "aes", not(miri)),
+ all(any(target_arch = "arm", target_arch = "aarch64"), target_feature = "crypto", not(miri), feature = "stdsimd")
+))]
fn fallbackhash<H: Hash>(_b: &H) -> u64 {
panic!("aes must be disabled")
}
@@ -64,152 +76,70 @@ fn gen_strings() -> Vec<String> {
.collect()
}
-const U8_VALUES: [u8; 1] = [123];
-const U16_VALUES: [u16; 1] = [1234];
-const U32_VALUES: [u32; 1] = [12345678];
-const U64_VALUES: [u64; 1] = [1234567890123456];
-const U128_VALUES: [u128; 1] = [12345678901234567890123456789012];
+const U8_VALUE: u8 = 123;
+const U16_VALUE: u16 = 1234;
+const U32_VALUE: u32 = 12345678;
+const U64_VALUE: u64 = 1234567890123456;
+const U128_VALUE: u128 = 12345678901234567890123456789012;
fn bench_ahash(c: &mut Criterion) {
- c.bench(
- "aeshash",
- ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(aeshash(s))), &U8_VALUES),
- );
- c.bench(
- "aeshash",
- ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(aeshash(s))), &U16_VALUES),
- );
- c.bench(
- "aeshash",
- ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(aeshash(s))), &U32_VALUES),
- );
- c.bench(
- "aeshash",
- ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(aeshash(s))), &U64_VALUES),
- );
- c.bench(
- "aeshash",
- ParameterizedBenchmark::new("u128", |b, &s| b.iter(|| black_box(aeshash(s))), &U128_VALUES),
- );
- c.bench(
- "aeshash",
- ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(aeshash(s))), gen_strings()),
- );
+ let mut group = c.benchmark_group("aeshash");
+ group.bench_with_input("u8", &U8_VALUE, |b, s| b.iter(|| black_box(aeshash(s))));
+ group.bench_with_input("u16", &U16_VALUE, |b, s| b.iter(|| black_box(aeshash(s))));
+ group.bench_with_input("u32", &U32_VALUE, |b, s| b.iter(|| black_box(aeshash(s))));
+ group.bench_with_input("u64", &U64_VALUE, |b, s| b.iter(|| black_box(aeshash(s))));
+ group.bench_with_input("u128", &U128_VALUE, |b, s| b.iter(|| black_box(aeshash(s))));
+ group.bench_with_input("string", &gen_strings(), |b, s| b.iter(|| black_box(aeshash(s))));
}
fn bench_fallback(c: &mut Criterion) {
- c.bench(
- "fallback",
- ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U8_VALUES),
- );
- c.bench(
- "fallback",
- ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U16_VALUES),
- );
- c.bench(
- "fallback",
- ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U32_VALUES),
- );
- c.bench(
- "fallback",
- ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U64_VALUES),
- );
- c.bench(
- "fallback",
- ParameterizedBenchmark::new("u128", |b, &s| b.iter(|| black_box(fallbackhash(s))), &U128_VALUES),
- );
- c.bench(
- "fallback",
- ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(fallbackhash(s))), gen_strings()),
- );
+ let mut group = c.benchmark_group("fallback");
+ group.bench_with_input("u8", &U8_VALUE, |b, s| b.iter(|| black_box(fallbackhash(s))));
+ group.bench_with_input("u16", &U16_VALUE, |b, s| b.iter(|| black_box(fallbackhash(s))));
+ group.bench_with_input("u32", &U32_VALUE, |b, s| b.iter(|| black_box(fallbackhash(s))));
+ group.bench_with_input("u64", &U64_VALUE, |b, s| b.iter(|| black_box(fallbackhash(s))));
+ group.bench_with_input("u128", &U128_VALUE, |b, s| b.iter(|| black_box(fallbackhash(s))));
+ group.bench_with_input("string", &gen_strings(), |b, s| b.iter(|| black_box(fallbackhash(s))));
}
fn bench_fx(c: &mut Criterion) {
- c.bench(
- "fx",
- ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(fxhash(s))), &U8_VALUES),
- );
- c.bench(
- "fx",
- ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(fxhash(s))), &U16_VALUES),
- );
- c.bench(
- "fx",
- ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(fxhash(s))), &U32_VALUES),
- );
- c.bench(
- "fx",
- ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(fxhash(s))), &U64_VALUES),
- );
- c.bench(
- "fx",
- ParameterizedBenchmark::new("u128", |b, &s| b.iter(|| black_box(fxhash(s))), &U128_VALUES),
- );
- c.bench(
- "fx",
- ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(fxhash(s))), gen_strings()),
- );
+ let mut group = c.benchmark_group("fx");
+ group.bench_with_input("u8", &U8_VALUE, |b, s| b.iter(|| black_box(fxhash(s))));
+ group.bench_with_input("u16", &U16_VALUE, |b, s| b.iter(|| black_box(fxhash(s))));
+ group.bench_with_input("u32", &U32_VALUE, |b, s| b.iter(|| black_box(fxhash(s))));
+ group.bench_with_input("u64", &U64_VALUE, |b, s| b.iter(|| black_box(fxhash(s))));
+ group.bench_with_input("u128", &U128_VALUE, |b, s| b.iter(|| black_box(fxhash(s))));
+ group.bench_with_input("string", &gen_strings(), |b, s| b.iter(|| black_box(fxhash(s))));
}
fn bench_fnv(c: &mut Criterion) {
- c.bench(
- "fnv",
- ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(fnvhash(s))), &U8_VALUES),
- );
- c.bench(
- "fnv",
- ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(fnvhash(s))), &U16_VALUES),
- );
- c.bench(
- "fnv",
- ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(fnvhash(s))), &U32_VALUES),
- );
- c.bench(
- "fnv",
- ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(fnvhash(s))), &U64_VALUES),
- );
- c.bench(
- "fnv",
- ParameterizedBenchmark::new("u128", |b, &s| b.iter(|| black_box(fnvhash(s))), &U128_VALUES),
- );
- c.bench(
- "fnv",
- ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(fnvhash(s))), gen_strings()),
- );
+ let mut group = c.benchmark_group("fnv");
+ group.bench_with_input("u8", &U8_VALUE, |b, s| b.iter(|| black_box(fnvhash(s))));
+ group.bench_with_input("u16", &U16_VALUE, |b, s| b.iter(|| black_box(fnvhash(s))));
+ group.bench_with_input("u32", &U32_VALUE, |b, s| b.iter(|| black_box(fnvhash(s))));
+ group.bench_with_input("u64", &U64_VALUE, |b, s| b.iter(|| black_box(fnvhash(s))));
+ group.bench_with_input("u128", &U128_VALUE, |b, s| b.iter(|| black_box(fnvhash(s))));
+ group.bench_with_input("string", &gen_strings(), |b, s| b.iter(|| black_box(fnvhash(s))));
}
fn bench_sea(c: &mut Criterion) {
- c.bench(
- "sea",
- ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(seahash(s))), gen_strings()),
- );
+ let mut group = c.benchmark_group("sea");
+ group.bench_with_input("u8", &U8_VALUE, |b, s| b.iter(|| black_box(seahash(s))));
+ group.bench_with_input("u16", &U16_VALUE, |b, s| b.iter(|| black_box(seahash(s))));
+ group.bench_with_input("u32", &U32_VALUE, |b, s| b.iter(|| black_box(seahash(s))));
+ group.bench_with_input("u64", &U64_VALUE, |b, s| b.iter(|| black_box(seahash(s))));
+ group.bench_with_input("u128", &U128_VALUE, |b, s| b.iter(|| black_box(seahash(s))));
+ group.bench_with_input("string", &gen_strings(), |b, s| b.iter(|| black_box(seahash(s))));
}
fn bench_sip(c: &mut Criterion) {
- c.bench(
- "sip",
- ParameterizedBenchmark::new("u8", |b, &s| b.iter(|| black_box(siphash(s))), &U8_VALUES),
- );
- c.bench(
- "sip",
- ParameterizedBenchmark::new("u16", |b, &s| b.iter(|| black_box(siphash(s))), &U16_VALUES),
- );
- c.bench(
- "sip",
- ParameterizedBenchmark::new("u32", |b, &s| b.iter(|| black_box(siphash(s))), &U32_VALUES),
- );
- c.bench(
- "sip",
- ParameterizedBenchmark::new("u64", |b, &s| b.iter(|| black_box(siphash(s))), &U64_VALUES),
- );
- c.bench(
- "sip",
- ParameterizedBenchmark::new("u128", |b, &s| b.iter(|| black_box(siphash(s))), &U128_VALUES),
- );
- c.bench(
- "sip",
- ParameterizedBenchmark::new("string", |b, s| b.iter(|| black_box(siphash(s))), gen_strings()),
- );
+ let mut group = c.benchmark_group("sip");
+ group.bench_with_input("u8", &U8_VALUE, |b, s| b.iter(|| black_box(siphash(s))));
+ group.bench_with_input("u16", &U16_VALUE, |b, s| b.iter(|| black_box(siphash(s))));
+ group.bench_with_input("u32", &U32_VALUE, |b, s| b.iter(|| black_box(siphash(s))));
+ group.bench_with_input("u64", &U64_VALUE, |b, s| b.iter(|| black_box(siphash(s))));
+ group.bench_with_input("u128", &U128_VALUE, |b, s| b.iter(|| black_box(siphash(s))));
+ group.bench_with_input("string", &gen_strings(), |b, s| b.iter(|| black_box(siphash(s))));
}
criterion_main!(benches);
diff --git a/tests/map_tests.rs b/tests/map_tests.rs
index 2c2fca3..be617a2 100644
--- a/tests/map_tests.rs
+++ b/tests/map_tests.rs
@@ -1,9 +1,9 @@
-use std::hash::{Hash, Hasher};
+use std::hash::{BuildHasher, Hash, Hasher};
use criterion::*;
use fxhash::FxHasher;
-use ahash::{AHasher, CallHasher};
+use ahash::{AHasher, CallHasher, RandomState};
fn gen_word_pairs() -> Vec<String> {
let words: Vec<_> = r#"
@@ -119,16 +119,16 @@ yet, you, young, your, yourself"#
}
#[allow(unused)] // False positive
-fn test_hash_common_words<T: Hasher>(hasher: impl Fn() -> T) {
+fn test_hash_common_words<B: BuildHasher>(build_hasher: &B) {
let word_pairs: Vec<_> = gen_word_pairs();
- check_for_collisions(&hasher, &word_pairs, 32);
+ check_for_collisions(build_hasher, &word_pairs, 32);
}
#[allow(unused)] // False positive
-fn check_for_collisions<T: Hasher, H: Hash>(hasher: &impl Fn() -> T, items: &[H], bucket_count: usize) {
+fn check_for_collisions<H: Hash, B: BuildHasher>(build_hasher: &B, items: &[H], bucket_count: usize) {
let mut buckets = vec![0; bucket_count];
for item in items {
- let value = hash(item, &hasher) as usize;
+ let value = hash(item, build_hasher) as usize;
buckets[value % bucket_count] += 1;
}
let mean = items.len() / bucket_count;
@@ -151,23 +151,22 @@ fn check_for_collisions<T: Hasher, H: Hash>(hasher: &impl Fn() -> T, items: &[H]
}
#[allow(unused)] // False positive
-fn hash<H: Hash, T: Hasher>(b: &H, hasher: &dyn Fn() -> T) -> u64 {
- let hasher = hasher();
- H::get_hash(b, hasher)
+fn hash<H: Hash, B: BuildHasher>(b: &H, build_hasher: &B) -> u64 {
+ H::get_hash(b, build_hasher)
}
#[test]
fn test_bucket_distribution() {
- let hasher = || AHasher::new_with_keys(123456789, 987654321);
- test_hash_common_words(&hasher);
+ let build_hasher = RandomState::with_seeds(1, 2, 3, 4);
+ test_hash_common_words(&build_hasher);
let sequence: Vec<_> = (0..320000).collect();
- check_for_collisions(&hasher, &sequence, 32);
+ check_for_collisions(&build_hasher, &sequence, 32);
let sequence: Vec<_> = (0..2560000).collect();
- check_for_collisions(&hasher, &sequence, 256);
+ check_for_collisions(&build_hasher, &sequence, 256);
let sequence: Vec<_> = (0..320000).map(|i| i * 1024).collect();
- check_for_collisions(&hasher, &sequence, 32);
+ check_for_collisions(&build_hasher, &sequence, 32);
let sequence: Vec<_> = (0..2560000_u64).map(|i| i * 1024).collect();
- check_for_collisions(&hasher, &sequence, 256);
+ check_for_collisions(&build_hasher, &sequence, 256);
}
fn ahash_vec<H: Hash>(b: &Vec<H>) -> u64 {
diff --git a/tests/nopanic.rs b/tests/nopanic.rs
index cd5bb93..d48ff55 100644
--- a/tests/nopanic.rs
+++ b/tests/nopanic.rs
@@ -20,12 +20,27 @@ fn hash_test_final_wrapper(num: i32, string: &str) {
hash_test_final(num, string);
}
+struct SimpleBuildHasher {
+ hasher: AHasher,
+}
+
+impl BuildHasher for SimpleBuildHasher {
+ type Hasher = AHasher;
+
+ fn build_hasher(&self) -> Self::Hasher {
+ self.hasher.clone()
+ }
+}
+
#[inline(never)]
#[no_panic]
fn hash_test_specialize(num: i32, string: &str) -> (u64, u64) {
let hasher1 = AHasher::new_with_keys(1, 2);
let hasher2 = AHasher::new_with_keys(1, 2);
- (i32::get_hash(&num, hasher1), <[u8]>::get_hash(string.as_bytes(), hasher2))
+ (
+ i32::get_hash(&num, &SimpleBuildHasher { hasher: hasher1 }),
+ <[u8]>::get_hash(string.as_bytes(), &SimpleBuildHasher { hasher: hasher2 }),
+ )
}
#[inline(never)]
@@ -36,9 +51,12 @@ fn hash_test_random_wrapper(num: i32, string: &str) {
#[inline(never)]
#[no_panic]
fn hash_test_random(num: i32, string: &str) -> (u64, u64) {
- let hasher1 = RandomState::with_seeds(1, 2, 3, 4).build_hasher();
- let hasher2 = RandomState::with_seeds(1, 2, 3, 4).build_hasher();
- (i32::get_hash(&num,hasher1), <[u8]>::get_hash(string.as_bytes(), hasher2))
+ let build_hasher1 = RandomState::with_seeds(1, 2, 3, 4);
+ let build_hasher2 = RandomState::with_seeds(1, 2, 3, 4);
+ (
+ i32::get_hash(&num, &build_hasher1),
+ <[u8]>::get_hash(string.as_bytes(), &build_hasher2),
+ )
}
#[inline(never)]