#hash

jumphash

A Fast, Minimal Memory, Consistent Hash Algorithm

8 releases

0.1.8 Nov 2, 2021
0.1.6 Aug 15, 2019
0.1.5 Nov 22, 2018
0.1.3 Jan 24, 2017
0.1.2 Nov 29, 2016

#299 in Algorithms

Download history 530/week @ 2023-01-31 415/week @ 2023-02-07 422/week @ 2023-02-14 503/week @ 2023-02-21 449/week @ 2023-02-28 320/week @ 2023-03-07 457/week @ 2023-03-14 664/week @ 2023-03-21 945/week @ 2023-03-28 443/week @ 2023-04-04 707/week @ 2023-04-11 473/week @ 2023-04-18 447/week @ 2023-04-25 576/week @ 2023-05-02 626/week @ 2023-05-09 339/week @ 2023-05-16

2,104 downloads per month
Used in 5 crates (3 directly)

ISC license

6KB
95 lines

Jump Consistent Hash

A fast, minimal memory, consistent hash algorithm.

API documentation

Example

Cargo dependencies:

[dependencies]
jumphash = "~0"

Rust code:

extern crate jumphash;

let jh = jumphash::JumpHasher::new();
let slot_count = 100;
let slot_for_key = jh.slot(&"key", slot_count);

lib.rs:

An implementation of the Jump Consistent Hash Algorithm.

Example

extern crate jumphash;

let jh = jumphash::JumpHasher::new();
let slot_count = 100;
let slot_for_key = jh.slot(&"key", slot_count);

Dependencies

~360KB