ChibiHash-0.1.0.0: a simple and fast 64-bit hash function
Copyright(c) Ville Vesilehto 2024
LicenseMIT
Maintainerville@vesilehto.fi
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

ChibiHash

Description

ChibiHash is a simple and fast 64-bit hash function suitable for hash tables and hash-based data structures. This is a Haskell port of the original implementation by N-R-K at https://github.com/N-R-K/ChibiHash.

Example usage:

import ChibiHash (chibihash64)
import qualified Data.ByteString as BS

main :: IO ()
main = do
    let input = BS.pack [1,2,3,4]
    let seed = 0
    print $ chibihash64 input seed
Synopsis

Hash Function

chibihash64 :: ByteString -> Word64 -> Word64 Source #

Main hash function that processes input in several stages: 1. Process full 32-byte blocks 2. Process remaining bytes (< 32 bytes) 3. Apply final mixing function