#hash

jumphash

A Fast, Minimal Memory, Consistent Hash Algorithm

7 releases

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

#339 in Algorithms

Download history 401/week @ 2021-02-24 581/week @ 2021-03-03 728/week @ 2021-03-10 812/week @ 2021-03-17 656/week @ 2021-03-24 574/week @ 2021-03-31 824/week @ 2021-04-07 670/week @ 2021-04-14 673/week @ 2021-04-21 738/week @ 2021-04-28 854/week @ 2021-05-05 848/week @ 2021-05-12 1054/week @ 2021-05-19 425/week @ 2021-05-26 422/week @ 2021-06-02 696/week @ 2021-06-09

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

ISC license

5KB
68 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

~395KB