ChibiHash: a simple and fast 64-bit hash function

[ algorithms, data, library, mit, program ] [ Propose Tags ] [ Report a vulnerability ]

Haskell port of ChibiHash, a simple and fast 64-bit hash function.

Features:

  • Fast 64-bit hashing

  • Suitable for hash tables and hash-based data structures

  • Supports both V1 and V2 implementations

For more information, see the article "ChibiHash: A small, fast 64-bit hash function" at https://nrk.neocities.org/articles/chibihash


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.2.0.0
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), bytestring (>=0.10 && <0.13), ChibiHash [details]
Tested with ghc ==9.4.7, ghc ==9.6.3, ghc ==9.8.1
License MIT
Copyright 2024 Ville Vesilehto
Author Ville Vesilehto
Maintainer ville@vesilehto.fi
Revised Revision 1 made by thevilledev at 2024-12-02T20:35:42Z
Category Data, Algorithms
Home page https://github.com/thevilledev/ChibiHash-hs
Bug tracker https://github.com/thevilledev/ChibiHash-hs/issues
Source repo head: git clone https://github.com/thevilledev/ChibiHash-hs.git(tag v0.2.0.0)
Uploaded by thevilledev at 2024-12-02T20:31:58Z
Distributions
Executables ChibiHash-example
Downloads 24 total (24 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for ChibiHash-0.2.0.0

[back to package description]

ChibiHash-hs

Hackage Version

Haskell port of N-R-K/ChibiHash. See the article ChibiHash: A small, fast 64-bit hash function for more information.

All credit for the algorithm goes to N-R-K.

Usage

module Main (main) where

import ChibiHash (chibihash64)
import qualified Data.ByteString.Char8 as C8

main :: IO ()
main = do
    let text = "Hello, ChibiHash!"
    putStrLn $ "Input text: " ++ show text
    putStrLn $ "Hash (seed 0): " ++ show (chibihash64 (C8.pack text) 0)

You may also run the example program with cabal run.

Tests

Run tests with cabal test. Both v1 and v2 are tested.

License

MIT.