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

#659 in Algorithms

Download history 618/week @ 2024-03-14 423/week @ 2024-03-21 593/week @ 2024-03-28 606/week @ 2024-04-04 504/week @ 2024-04-11 891/week @ 2024-04-18 461/week @ 2024-04-25 411/week @ 2024-05-02 525/week @ 2024-05-09 580/week @ 2024-05-16 727/week @ 2024-05-23 576/week @ 2024-05-30 696/week @ 2024-06-06 1008/week @ 2024-06-13 665/week @ 2024-06-20 472/week @ 2024-06-27

2,951 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

~365KB