jmphash 0.1.0

An implementation of the jump consistent hash algorithim
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 6.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 242.68 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • jeromefroe/jmphash-rs
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • jeromefroe

Jump Consistent Hash

Build Status Coverage Status License

An implementation of the jump consistent hash algorithim as described in [A Fast, Minimal Memory, Consistent Hash Algorithim] (https://arxiv.org/pdf/1406.2294v1.pdf).

Example

extern crate jmphash;

use jmphash::jump_hash;

fn really_complicated_hash_function() -> u64 {
  42
}

fn main() {
    let num_buckets = 100;

    // first use a hash function of your choice to create a u64 key
    let key = really_complicated_hash_function();

    // then one can use `jump_hash` to map the key to a bucket
    let bucket = jump_hash(key, num_buckets);
}