Slice-by-8

Rust improved implementation of the Slice-by-8 intel algorithm.

Slice-by-8 do not load the standard library (a.k.a #![no_std])

Introduction

Slice-by-8 provides hash function that performs CRC32c hashing using improved variant of intel's Slice-by-8 algorithm.

Slice-by-8 is tested on little-endian but should work on big-endian architecture.

Usage

Using Hasher

```rust use sliceby8::SliceBy8BuildHasher; use std::collections::HashMap; const KEY: &str = "hash"; const VALUE: &str = "me!";

// Create a HashMap that use SliceBy8Hasher to hash keys let mut map = HashMap::with_hasher(SliceBy8BuildHasher::default()); map.insert(KEY, VALUE);

assert_eq!(map.get(&KEY), Some(&VALUE)); ```

Using Portable slice-by-8 functions

Slice-by-8 provides functions to hash slice of bytes.

rust ignore fn slice_by_8(buf: &[u8]) -> u32; fn slice_by_8_with_seed(buf: &[u8], seed: u32) -> u32; Noteslice_by_8 is a similar to slice_by_8_with_seed with seed equals 0.

Performance

This implementation is an improvement of the intel algorithm. Improvement are based on : * Stephan Brumme Fast CRC32 * Redis CRC Speed Improvements * Unreal Engine 4

TODO