ChibiHash-0.2.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 module provides both V1 and V2 implementations.

Example usage:

import ChibiHash (chibihash64)  -- Uses V1 by default
import qualified ChibiHash.V2 as V2

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

Hash Functions

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

Hash a ByteString with the default (V1) implementation

chibihash64V1 :: ByteString -> Word64 -> Word64 Source #

Hash a ByteString with the V1 implementation

chibihash64V2 :: ByteString -> Word64 -> Word64 Source #

Hash a ByteString with the V2 implementation