All Projects → arthurprs → metrohash-rs

arthurprs / metrohash-rs

Licence: MIT license
Rust MetroHash

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to metrohash-rs

Xxhash cpp
Port of the xxhash library to C++17.
Stars: ✭ 106 (+135.56%)
Mutual labels:  hashing, hash
Dagon
Advanced Hash Manipulation
Stars: ✭ 155 (+244.44%)
Mutual labels:  hashing, hash
Minperf
A Minimal Perfect Hash Function Library
Stars: ✭ 107 (+137.78%)
Mutual labels:  hashing, hash
Name That Hash
🔗 Don't know what type of hash it is? Name That Hash will name that hash type! 🤖 Identify MD5, SHA256 and 3000+ other hashes ☄ Comes with a neat web app 🔥
Stars: ✭ 540 (+1100%)
Mutual labels:  hashing, hash
node-blake2
All four BLAKE2 variants (blake2b, blake2bp, blake2s, blake2sp) with stream support for Node.js
Stars: ✭ 52 (+15.56%)
Mutual labels:  hashing, hash
Wyhash Rs
wyhash fast portable non-cryptographic hashing algorithm and random number generator in Rust
Stars: ✭ 44 (-2.22%)
Mutual labels:  hashing, hash
Password4j
Password4j is a user-friendly cryptographic library that supports Argon2, Bcrypt, Scrypt, PBKDF2 and various cryptographic hash functions.
Stars: ✭ 124 (+175.56%)
Mutual labels:  hashing, hash
pthash
Fast and compact minimal perfect hash functions in C++.
Stars: ✭ 62 (+37.78%)
Mutual labels:  hashing, hash
haiti
🔑 Hash type identifier (CLI & lib)
Stars: ✭ 287 (+537.78%)
Mutual labels:  hashing, hash
Clhash
C library implementing the ridiculously fast CLHash hashing function
Stars: ✭ 220 (+388.89%)
Mutual labels:  hashing, hash
Ahash
aHash is a non-cryptographic hashing algorithm that uses the AES hardware instruction
Stars: ✭ 251 (+457.78%)
Mutual labels:  hashing, hash
noble-hashes
Audited & minimal JS implementation of SHA2, SHA3, RIPEMD, BLAKE2/3, HMAC, HKDF, PBKDF2 & Scrypt
Stars: ✭ 213 (+373.33%)
Mutual labels:  hashing, hash
agent-python
Official python agent for using the distributed hashcracker Hashtopolis
Stars: ✭ 39 (-13.33%)
Mutual labels:  hashing, hash
Eternal
A C++14 compile-time/constexpr map and hash map with minimal binary footprint
Stars: ✭ 93 (+106.67%)
Mutual labels:  hashing, hash
komihash
Very fast, high-quality hash function (non-cryptographic, C) + PRNG
Stars: ✭ 68 (+51.11%)
Mutual labels:  hashing, hash
Data Structures
Data-Structures using C++.
Stars: ✭ 121 (+168.89%)
Mutual labels:  hashing, hash
bromberg sl2
Cayley hashing as in "Navigating in the Cayley Graph of SL₂(𝔽ₚ)"
Stars: ✭ 32 (-28.89%)
Mutual labels:  hashing, hash
laravel-hashid
HashId Implementation on Laravel Eloquent ORM
Stars: ✭ 23 (-48.89%)
Mutual labels:  hashing, hash
Util
A collection of useful utility functions
Stars: ✭ 201 (+346.67%)
Mutual labels:  hashing, hash
prvhash
PRVHASH - Pseudo-Random-Value Hash. Hash functions, PRNG with unlimited period, randomness extractor. (Codename Gradilac/Градилак)
Stars: ✭ 194 (+331.11%)
Mutual labels:  hashing, hash

Rust MetroHash

crates.io Docs Build Status

MetroHash is a high quality, high performance hash algorithm.

It hashes small keys in the single digit nanoseconds and surpasses 10+ GB/s in medium to long length keys.

Since the hash quality is also excellent (passes SMhasher), it's a good alternative in any situation where cryptographic security is not required.

Note that the algorithm is not stable across different endianesses and is optimized for 64bit platforms with fast unaligned memory access.

Usage

extern crate metrohash;
use metrohash::MetroHashMap;

let mut hash = MetroHashMap::default();
hash.insert(1000, "1000");
assert_eq!(hash.get(&1000), Some(&"1000"));

Benchmarks

test metro64::hash_u64          ... bench:           7 ns/iter (+/- 0) = 1142 MB/s
test metro64::hash_004_bytes    ... bench:           7 ns/iter (+/- 0) = 571 MB/s
test metro64::hash_007_bytes    ... bench:           8 ns/iter (+/- 0) = 875 MB/s
test metro64::hash_008_bytes    ... bench:           7 ns/iter (+/- 0) = 1142 MB/s
test metro64::hash_009_bytes    ... bench:           7 ns/iter (+/- 6) = 1285 MB/s
test metro64::hash_012_bytes    ... bench:           7 ns/iter (+/- 1) = 1714 MB/s
test metro64::hash_016_bytes    ... bench:           9 ns/iter (+/- 0) = 1777 MB/s
test metro64::hash_032_bytes    ... bench:          11 ns/iter (+/- 0) = 2909 MB/s
test metro64::hash_128_bytes    ... bench:          19 ns/iter (+/- 1) = 6736 MB/s
test metro64::hash_256_bytes    ... bench:          28 ns/iter (+/- 9) = 9142 MB/s
test metro64::hash_512_bytes    ... bench:          49 ns/iter (+/- 5) = 10448 MB/s
test metro64::hash_1_kilo_bytes ... bench:          88 ns/iter (+/- 36) = 11636 MB/s
test fnvh::hash_u64             ... bench:           3 ns/iter (+/- 2) = 2666 MB/s
test fnvh::hash_004_bytes       ... bench:           1 ns/iter (+/- 0) = 4000 MB/s
test fnvh::hash_007_bytes       ... bench:           3 ns/iter (+/- 0) = 2333 MB/s
test fnvh::hash_008_bytes       ... bench:           3 ns/iter (+/- 0) = 2666 MB/s
test fnvh::hash_009_bytes       ... bench:           3 ns/iter (+/- 0) = 3000 MB/s
test fnvh::hash_012_bytes       ... bench:           5 ns/iter (+/- 0) = 2400 MB/s
test fnvh::hash_016_bytes       ... bench:           7 ns/iter (+/- 0) = 2285 MB/s
test fnvh::hash_032_bytes       ... bench:          17 ns/iter (+/- 1) = 1882 MB/s
test fnvh::hash_128_bytes       ... bench:         125 ns/iter (+/- 9) = 1024 MB/s
test fnvh::hash_256_bytes       ... bench:         280 ns/iter (+/- 34) = 914 MB/s
test fnvh::hash_512_bytes       ... bench:         589 ns/iter (+/- 36) = 869 MB/s
test fnvh::hash_1_kilo_bytes    ... bench:       1,192 ns/iter (+/- 43) = 859 MB/s
test std_sip::hash_u64          ... bench:          16 ns/iter (+/- 0) = 500 MB/s
test std_sip::hash_004_bytes    ... bench:          12 ns/iter (+/- 3) = 333 MB/s
test std_sip::hash_007_bytes    ... bench:          14 ns/iter (+/- 0) = 500 MB/s
test std_sip::hash_008_bytes    ... bench:          15 ns/iter (+/- 1) = 533 MB/s
test std_sip::hash_009_bytes    ... bench:          17 ns/iter (+/- 9) = 529 MB/s
test std_sip::hash_012_bytes    ... bench:          16 ns/iter (+/- 0) = 750 MB/s
test std_sip::hash_016_bytes    ... bench:          19 ns/iter (+/- 2) = 842 MB/s
test std_sip::hash_032_bytes    ... bench:          27 ns/iter (+/- 2) = 1185 MB/s
test std_sip::hash_128_bytes    ... bench:          72 ns/iter (+/- 18) = 1777 MB/s
test std_sip::hash_256_bytes    ... bench:         133 ns/iter (+/- 13) = 1924 MB/s
test std_sip::hash_512_bytes    ... bench:         254 ns/iter (+/- 22) = 2015 MB/s
test std_sip::hash_1_kilo_bytes ... bench:         500 ns/iter (+/- 55) = 2048 MB/s
test xxh::hash_u64              ... bench:          11 ns/iter (+/- 0) = 727 MB/s
test xxh::hash_004_bytes        ... bench:          12 ns/iter (+/- 1) = 333 MB/s
test xxh::hash_007_bytes        ... bench:          20 ns/iter (+/- 1) = 350 MB/s
test xxh::hash_008_bytes        ... bench:          12 ns/iter (+/- 4) = 666 MB/s
test xxh::hash_009_bytes        ... bench:          19 ns/iter (+/- 5) = 473 MB/s
test xxh::hash_012_bytes        ... bench:          19 ns/iter (+/- 1) = 631 MB/s
test xxh::hash_016_bytes        ... bench:          13 ns/iter (+/- 0) = 1230 MB/s
test xxh::hash_032_bytes        ... bench:          17 ns/iter (+/- 4) = 1882 MB/s
test xxh::hash_128_bytes        ... bench:          25 ns/iter (+/- 1) = 5120 MB/s
test xxh::hash_256_bytes        ... bench:          36 ns/iter (+/- 2) = 7111 MB/s
test xxh::hash_512_bytes        ... bench:          57 ns/iter (+/- 28) = 8982 MB/s
test xxh::hash_1_kilo_bytes     ... bench:          98 ns/iter (+/- 7) = 10448 MB/s

Links:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].