RapidHash explained in plain terms means understanding the hash that took wyhash’s crown, a design from 2024 that turns any key into a 64-bit value faster than any rival that passes every quality test. The central question is why the fastest hash matters when most programs already hash quickly enough, and the answer is that hashing sits inside every lookup, every index and every cache, so RapidHash gives hash tables a quicker mix in fewer instructions, and that economy is the whole point of the design.
RapidHash is a fast non-cryptographic hash function created by Nicolas De Carli, built on the multiply-and-fold core of wyhash by Wang Yi. It turns a key into a 64-bit value by mixing the input with three secret words and a seed, and it is built on the idea that a hash should be as quick as its fastest operation, which means the design is meant for hash tables above all, and that focus is what makes it unlike the hashes of its era.
This article explains what RapidHash is, how it works, and where it runs in the real world.
Key takeaways
- RapidHash is a fast hash from 2024, by Nicolas De Carli.
- It is wyhash’s official successor, built on the same core.
- It is the fastest hash to pass every SMHasher test.
- It mixes with three secret words and a seed.
- It runs in Chromium and in Rust’s rapidhash crate.
What RapidHash is
RapidHash is a hash that turns a key into a 64-bit value with a multiply-and-fold core, and that smallness is what makes it unusual among hashes. Each word of input passes through a multiply with a secret, which means the hash spreads bits with a single operation, and because a multiply mixes more bit pairs than an xor, the result is well spread after very few steps.
Its signature feature is its three secrets. Most hashes mix with one constant, but RapidHash carries three secret words that are folded into the state, which means every output depends on all three, and because the secrets can be randomised per process, the same key hashes differently on different runs.
The design was a reaction to wyhash’s limits. Wyhash was fast but showed weak spots in quality testing, so De Carli asked whether the same core could be tightened, because a hash that is fast but biased is a hash tables cannot trust, and that practicality is what made RapidHash worth building.
It became one of the best-known fast hashes in the world, and it is named in every discussion of the field. RapidHash passes every SMHasher and SMHasher3 test, it runs about six percent faster than wyhash in those benchmarks, and it is still the first example engineers meet when they learn that a hash can be both fastest and clean, which means the design survives as a tool even though it is only a few years old.
Our guide to wyhash explains the hash RapidHash was built from, and our guide to xxHash explains the earlier speed champion it is measured against.
How RapidHash works
Everything starts with the seed and the secrets, which set the initial state. RapidHash takes a 64-bit seed and three secret words and folds them into the starting value, which means the hash depends on the seed, and because the secrets are caller-chosen, the same key gives different hashes under different seeds.
Each step begins with a word of input, which is mixed by the multiply. RapidHash takes the next 64-bit word, multiplies it with the running state into a 128-bit product, which means fresh data arrives at every step, and because the multiply is wide, the mixing spreads across all 64 output bits at once.
The fold is what makes the design work as a whole. After the multiply, RapidHash adds the high and low halves of the 128-bit product together, which means the value is scrambled thoroughly, and because the fold is a single addition, the mixing costs almost nothing.
The state spreads the effect further. The folded value is xored with the running state as the words are consumed, which means each word mixes with the ones before it, and because the state carries the history, the final value reflects the whole input.
The tail is what turns the last bytes into a hash. RapidHash handles the final few bytes with a dedicated routine, which means short remainders are mixed just as carefully as full words, and because the tail is exact, no input is ever hashed loosely.
The result comes from the folded state, read out as 64 bits. RapidHash outputs the running value directly as the hash, which means the result is a fixed size whatever the input, and that size is exactly what a hash table needs for its bucket index.

Comparing RapidHash with other fast hashes
RapidHash is one of several fast hashes built for tables, and each was built with a different emphasis. wyhash is the multiply-and-fold hash it descends from, xxHash is the earlier speed champion built for streaming, and RapidHash is the one built to pass every quality test at top speed, while each approach trades something for something else.
The table below sets out the main contrasts between the leading approaches.
| Aspect | RapidHash | wyhash | xxHash |
|---|---|---|---|
| Output size | 64 bits | 64 bits | 64 bits |
| Core step | Multiply and fold | Multiply and fold | Multiply and rotate |
| SMHasher | Passes all tests | Some failures | Passes most tests |
| Designed for | Hash tables | Hash tables | Streaming data |
| Best for | Fastest clean hashing | Legacy speed | Large inputs |
The practical result is that RapidHash is the right choice for the fastest clean hashing, wyhash suits legacy speed, and xxHash fits large inputs instead.
Where RapidHash is used
Hash tables use it to hash keys quickly. A table that looks up millions of keys needs a hash with a fast startup, because the first step dominates the cost, and that startup is the reason RapidHash earns its keep in table code.
Chromium uses it inside the browser. The Chromium project vendors RapidHash in its third-party code, because a browser hashes strings and identifiers constantly, and that workload is the reason the design was built for real programs.
Rust programs use it through the rapidhash crate. Any program can swap its tables to the RapidHasher, because the crate follows Rust’s standard hasher traits, and that ease is the reason RapidHash appears in Rust code far beyond its C origins.
Benchmarking uses it as the quality reference. Engineers still quote RapidHash when they discuss how fast a hash can be without failing tests, because it is the clearest example of speed and quality together, and that number shapes how new hashes are measured.
Teaching uses it as the successor example. Courses introduce RapidHash when they explain that wyhash’s crown passed to a tighter design, because it is the clearest case of iteration in a real design, and a student who understands RapidHash understands why quality tests matter in hash design.
Strengths and limits
The greatest strength of RapidHash is its speed at full quality. A hash that passes every SMHasher test while beating wyhash by about six percent gives tables faster lookups for free, and that strength is real, measured in the benchmarks themselves and confirmed by the projects that adopted it.
It is also a strength that the design is platform independent. A hash that runs fast on any 64-bit machine without special instructions is easy to ship everywhere, and that portability is worth more than cleverness in a field where a hash that needs one chip is a hash nobody adopts.
The limits are real, though, and the biggest is that it is not cryptographic. RapidHash was never designed to resist an attacker, which means it must never guard a secret or a key, and a system that needs a strong hash must use a cryptographic design instead.
RapidHash checklist
- Use RapidHash for hash tables, never for security or passwords.
- Remember it outputs 64 bits from a multiply and a fold.
- Note the seed and three secrets are caller-chosen.
- Compare it with wyhash to see two generations of one core.
- Study the fold, which is what mixes the 128-bit product.
- Check the key length, since short keys are its strength.
- Keep real secrets behind cryptographic hashes.
- Read the rapidhash notes to see how the step was built.
- Choose a cryptographic hash when untrusted input must be hashed.
Frequently asked questions
What is RapidHash in simple terms?
It is a 2024 fast hash that turns any key into a 64-bit value by multiplying words with three secrets and folding the 128-bit products together.
Who created RapidHash?
Nicolas De Carli, who built it on Wang Yi’s wyhash core and released it as wyhash’s official successor.
How is RapidHash different from wyhash?
Both mix with multiplies, but RapidHash tightens the core with three secrets and passes every SMHasher test while running about six percent faster.
Is RapidHash still secure?
It is fast and well tested, but it is a non-cryptographic hash, so it must never guard secrets or signatures.
Where is RapidHash used?
In hash tables, in Chromium’s third-party code, in the Rust rapidhash crate, in benchmarking, and in teaching about fast hashing.
When should I use RapidHash?
When you need the fastest hash that passes every quality test, when you build hash tables, or when you study modern hash design.
The bottom line
RapidHash explained in one line is this: the fastest clean hash, a 2024 design of one multiply and a fold that beat its parent on speed and quality and taught the field that a hash can be both quick and unbiased.
It is proof that tightening a good core beats inventing a new one, and the reason it still matters is that every fast hash designed since has been judged partly by the lesson RapidHash taught.
This article is general information about how RapidHash works, not advice about choosing encryption for a particular device or system.







