#consistent-hashing #algorithm #memory #hash #jump

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

#2403 in Algorithms

Download history 162/week @ 2024-11-17 166/week @ 2024-11-24 326/week @ 2024-12-01 367/week @ 2024-12-08 447/week @ 2024-12-15 26/week @ 2024-12-22 153/week @ 2024-12-29 516/week @ 2025-01-05 475/week @ 2025-01-12 459/week @ 2025-01-19 491/week @ 2025-01-26 499/week @ 2025-02-02 596/week @ 2025-02-09 446/week @ 2025-02-16 286/week @ 2025-02-23 282/week @ 2025-03-02

1,623 downloads per month
Used in 5 crates (3 directly)

ISC license

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