SuperFastHash explained in plain terms means understanding the 32-bit hash that beat the classics with a short loop, a design from 2004 that mixes four bytes at a time with shifts, xors and adds. The central question is why a hash built from such plain operations can outrun fancier designs, and the answer is that it spends its budget on the input instead of on ceremony, so SuperFastHash does more mixing per instruction than its rivals, and that economy is the whole point of the design.
SuperFastHash is a fast non-cryptographic hash function published by Paul Hsieh on his hash-function page, producing a 32-bit digest. It turns a message into a fingerprint by reading little-endian 16-bit pieces and folding them into a single running value, and it is built on the idea that a hash should use wider input fragments than the byte-at-a-time designs before it, which means the design leans on 16-bit words, and that focus is what makes it unlike the hashes of its era.
This article explains what SuperFastHash is, how it works, and where it runs in the real world.
Key takeaways
- SuperFastHash is a 32-bit hash from 2004, by Paul Hsieh.
- It processes four bytes per loop from 16-bit pieces.
- It starts from the input length, not from a seed.
- It ends with a six-step avalanche that spreads the bits.
- It is for tables and checksums, never for security.
What SuperFastHash is
SuperFastHash is a hash that turns a message into a fingerprint with a loop of shifts and adds, and that plainness is what makes it unusual among fast hashes. Each step reads two 16-bit pieces, mixes them into the running value and shifts it on, which means the mixing happens in a few instructions, and because the operations are so cheap, the hash runs at the speed of the processor’s arithmetic.
Its signature feature is the four-byte step. Most hashes of its day consumed one byte at a time, but SuperFastHash consumes four bytes per loop, which means it needs a quarter as many iterations, and because the pieces are 16 bits wide, the mixing has more material to work with.
The design was a reaction to the slowness of the classics. The hash functions shipped with most libraries read a byte, mixed it and moved on, so Hsieh searched for parameters that avalanched better and found them in a few hours of work, because a hash table deserves a hash that keeps up, and that practicality is what made SuperFastHash worth publishing.
It became one of the best-known fast hashes in the world, and it is named in every discussion of the field. SuperFastHash ran about two-thirds faster than Bob Jenkins’ hashes in the author’s own tests, it is ported to nearly every language, and it is still the first example engineers meet when they learn that a short loop can hash, which means the design survives as a tool even though newer hashes have arrived.
Its most famous property is its avalanche. The final six steps spread every input bit across all 32 output bits, which means the digest looks random even for similar inputs, and because that spread was verified with statistical tests, the claim has never been in doubt.
Our guide to MurmurHash explains the hash that defined the field it joined, and our guide to xxHash explains the later speed champion that overtook it.
How SuperFastHash works
Everything starts with the length, which seeds the running value. SuperFastHash sets its state to the byte length of the input, which means the empty input hashes to zero, and because the length is part of the state, inputs of different lengths start from different places.
Each step begins with four bytes, which are read as two 16-bit pieces. SuperFastHash takes the next little-endian pair and adds the first half into the state, which means fresh data arrives at every step, and because the pieces are wide, the hash absorbs data quickly.
The mixing is what makes the design work as a whole. The second half is shifted left by eleven and xored with the state, then the state is shifted left by sixteen and xored with that result, which means the value is scrambled thoroughly, and because the shifts are large, a small change spreads across the whole state.
The tail spreads the effect further. For one to three leftover bytes, SuperFastHash runs a short mixing sequence of its own, which means short inputs are handled rather than ignored, and because the tail uses the same shifts, the design needs no separate machinery for the end.
The avalanche is what turns the state into a digest. After the last byte, SuperFastHash runs six shift-xor and shift-add steps, which means the result depends on the whole message and nothing else, and because the steps alternate shifts and adds, the mixing is complete before the value is read out.
The digest comes from the final state, read out as a single 32-bit word. SuperFastHash outputs the avalanched value directly as the fingerprint, which means the result is a fixed size whatever the input, and that size is exactly what a hash table or a cache needs for its lookup key.

Comparing SuperFastHash with other fast hashes
SuperFastHash is one of several fast hashes built for hash tables, and each was built with a different emphasis. MurmurHash is the older hash that defined the field, xxHash is the later champion built on prime multiplication and rotation, and SuperFastHash is the one built on a short shift-and-add loop, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | SuperFastHash | MurmurHash | xxHash |
|---|---|---|---|
| Output size | 32 bits | 32 or 128 bits | 32, 64 or 128 bits |
| Core operation | Shift, xor, add | Multiply and rotate | Multiply and rotate |
| Bytes per step | 4 | 4 | 4 or 8 |
| Year | 2004 | 2008 | 2012 |
| Best for | Small inputs and tables | General hashing | General hashing |
The practical result is that SuperFastHash is the right choice for small inputs and tables, MurmurHash suits general hashing, and xxHash fits general hashing instead.
Where SuperFastHash is used
Hash tables use it to spread keys with a small fingerprint. A table that stores short strings wants a hash that is both fast and well distributed, because a slow hash becomes the bottleneck, and that speed is the reason SuperFastHash earns its keep in language runtimes.
Caches use it to fingerprint keys quickly. A cache that hashes short identifiers needs a hash that finishes in a few dozen instructions, because a slow hash becomes the bottleneck, and that brevity is the reason SuperFastHash appears in data systems.
Games use it to hash assets and names. A game that looks up thousands of short names per frame needs a hash that costs almost nothing, because a slow hash steals frame time, and that cheapness is the reason SuperFastHash appears in engines.
Benchmarking uses it as a classic reference. Engineers still quote SuperFastHash when they discuss how fast a simple hash can run, because it is the clearest example of a short loop paying off, and that number shapes how new hashes are measured.
Teaching uses it as the avalanche example. Courses introduce SuperFastHash when they explain that a final mixing step matters as much as the loop, because it is the clearest case of the idea in a real design, and a student who understands SuperFastHash understands why the ending counts.
Strengths and limits
The greatest strength of SuperFastHash is its speed on short inputs. A hash that mixes four bytes per loop gives programs faster tables for free, and that strength is real, measured in the author’s benchmarks and confirmed by the ports that carried it everywhere.
It is also a strength that the design is tiny to implement. A loop, a tail and an avalanche fit in a few dozen lines, and that brevity is worth more than cleverness in a field where a hash nobody can port is a hash nobody uses.
The limits are real, though, and the biggest is that it has no seed. An attacker who controls the keys can craft many inputs with the same value, which means it must never guard a table that faces hostile input, and a system that needs that protection must use a seeded hash instead.
SuperFastHash checklist
- Use SuperFastHash for tables, never for security or passwords.
- Remember it hashes 32 bits from four-byte steps.
- Note the state starts from the input length.
- Compare it with MurmurHash to see two kinds of fast design.
- Study the avalanche, which spreads every input bit.
- Check the tail, which handles one to three leftover bytes.
- Keep real digests behind standard hashes for signatures.
- Read Hsieh’s page to see how the parameters were found.
- Choose a seeded hash when inputs may be hostile.
Frequently asked questions
What is SuperFastHash in simple terms?
It is a 2004 fast hash that turns any input into a 32-bit fingerprint by mixing four-byte blocks with shifts, xors and adds.
Who created SuperFastHash?
Paul Hsieh, who published it on his hash-function page after searching for parameters with the best avalanching.
How is SuperFastHash different from MurmurHash?
Both are fast 32-bit hashes, but SuperFastHash mixes with shifts and adds while MurmurHash mixes with multiplies and rotations.
Is SuperFastHash still secure?
It is fast and well tested, but it is not a cryptographic hash, and it has no seed, so it must never guard secrets.
Where is SuperFastHash used?
In hash tables, in caches, in games, in benchmarking, and in teaching about avalanching.
When should I use SuperFastHash?
When you need a tiny fast hash for trusted keys, when you study short loops, or when you want the classic that beat Jenkins.
The bottom line
SuperFastHash explained in one line is this: the short-loop hash, a 2004 design that mixed four bytes at a time and taught the field that plain operations can outrun fancy ones.
It is proof that economy beats ceremony, and the reason it still matters is that every fast hash designed since has been judged partly by the lesson SuperFastHash taught.
This article is general information about how SuperFastHash works, not advice about choosing encryption for a particular device or system.







