gitwtfhub

wtf is hashevals?

avinassh/hashevals — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2025-12-21

Audience · developerComplexity · 3/5QuietSetup · easy

TL;DR

A Rust tool that tests hash functions for quality, checking bit avalanche, collisions, and output distribution to help you pick the best one for a database, cache, or system.

Mindmap

mindmap
  root((repo))
    What it does
      Tests avalanche effect
      Checks collisions
      Measures distribution
    Tech stack
      Rust
    Use cases
      Choose a hash function
      Benchmark speed
      Test new hash algorithms
    Audience
      Systems developers
      Database builders
    Results
      Ranked by bias
      Ranked by speed

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Compare multiple hash functions to pick the best one for a database or cache.

REASON 2

Test a new hash function's avalanche effect and collision rate before adopting it.

REASON 3

Check whether a hash function distributes outputs evenly for bucketed data structures.

REASON 4

Benchmark hash function speed across tiny, short, and long input sizes.

What's in the stack?

Rust

How it stacks up

avinassh/hashevals0verflowme/alarm-clock0verflowme/seclists
LanguageCSS
Last pushed2025-12-212022-10-032020-05-03
MaintenanceQuietDormantDormant
Setup difficultyeasyeasyeasy
Complexity3/52/51/5
Audiencedevelopervibe coderops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 30min

Written in Rust, adding a new hash function to test just means adding it to the list in code.

Wtf does this do

HashEvals is a testing tool that checks whether hash functions are actually good at their job. A hash function takes any input (a name, a file, a number) and produces a fixed-size number as output. The catch is that good hash functions need to spread outputs evenly and randomly, so small changes in the input produce completely different outputs, and no input produces the same output as another (ideally). This tool measures exactly how well various hash functions meet those standards. The tool runs three main tests on each hash function. First, it checks the "avalanche effect" by flipping individual bits in the input one at a time and counting how many output bits change, a good hash should flip roughly half the output bits for each input bit flipped. Second, it tests for collisions when hashing integers with only the last few bytes filled in, mimicking what happens when you use a hash table with integer keys. Third, it runs statistical distribution checks to spot whether some output values appear much more often than others, which would cause problems in bucketed data structures or load balancers. You'd use this if you're building something that relies heavily on hashing, a database, a cache, a distributed system, and you want to know which hash function actually performs best for your use case. The results table shows different hash functions ranked by metrics like how evenly they distribute outputs (lower bias is better) and how fast they run. The README includes results broken down by input size (tiny, short, and long chunks), since some hash functions perform differently depending on what they're hashing. The code is intentionally minimal and written in Rust, so it runs fast and the results are deterministic, you get the same numbers every time you run it with the same settings. If you want to test a new hash function, you just need to add it to the list and the tool automatically runs all three test suites against it.

Yoink these prompts

Prompt 1
Help me run HashEvals against a few common hash functions and interpret the results table.
Prompt 2
Show me how to add a new custom hash function to HashEvals and test it.
Prompt 3
Explain what the avalanche effect test in HashEvals measures and why it matters.
Prompt 4
Which hash function should I use for my hash table based on HashEvals' collision results?

Frequently asked questions

wtf is hashevals?

A Rust tool that tests hash functions for quality, checking bit avalanche, collisions, and output distribution to help you pick the best one for a database, cache, or system.

Is hashevals actively maintained?

Quiet — no commits in 6-12 months (last push 2025-12-21).

How hard is hashevals to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is hashevals for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.