#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

#115 in Algorithms

Download history 430/week @ 2021-09-26 701/week @ 2021-10-03 601/week @ 2021-10-10 869/week @ 2021-10-17 963/week @ 2021-10-24 757/week @ 2021-10-31 634/week @ 2021-11-07 542/week @ 2021-11-14 350/week @ 2021-11-21 461/week @ 2021-11-28 578/week @ 2021-12-05 538/week @ 2021-12-12 270/week @ 2021-12-19 199/week @ 2021-12-26 551/week @ 2022-01-02 499/week @ 2022-01-09

1,525 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

~385KB