blob: 42d28202afdc5fc5ba71f68d74a681b4d4f64873 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>xxHash - Extremely fast non-cryptographic hash algorithm</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="">
<link rel="stylesheet" href="">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="js/bootstrap-patch.css">
.list-inline li a img {
height: 50px;
<body style="padding-top:0; padding-bottom:0; ">
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<a class="navbar-brand" href="/xxHash/">xxHash</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-nav">
<li><a href="">Latest Release</a></li>
<li><a href="#other-languages">Versions</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Index<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#benchmarks">Benchmarks</a></li>
<li><a href="#other-languages">Other Source versions</a></li>
<li><a href="#references">Reference usages</a></li>
<ul class="nav navbar-nav navbar-right">
<li><a href="!forum/lz4c">Public discussion forum</a></li>
<li><a href="">Issue Tracker</a></li>
<li><a href=""><i class="fa fa-lg fa-github"></i> GitHub</a></li>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
<a name="summary"></a>
<div class="container">
<div class="page-header jumbotron text-justify" style="padding-top:1em;padding-bottom:2em;">
<iframe src="" frameborder="0" scrolling="0" width="160px" height="30px"></iframe>
xxHash is an extremely fast non-cryptographic hash algorithm, working at speeds close to RAM limits.
It is proposed in two flavors, 32 and 64 bits.
<xmp theme="sandstone" style="display:none;">
<a name="benchmarks"></a>
The benchmark uses the
[Open-Source SMHasher program by Austin Appleby](
compiled with Visual C on Windows Seven 32-bits in single-thread mode.
The reference system uses a Core 2 Duo @3.0GHz.
| Name | Speed | Quality | Author |
| xxHash | 5.4 GB/s | 10 | Y.C. |
| MurmurHash 3a | 2.7 GB/s | 10 | Austin Appleby |
| SBox | 1.4 GB/s | 9 | Bret Mulvey |
| Lookup3 | 1.2 GB/s | 9 | Bob Jenkins |
| CityHash64 | 1.05 GB/s| 10 | Pike & Alakuijala|
| FNV | 0.55 GB/s| 5 | Fowler, Noll, Vo |
| CRC32 | 0.43 GB/s| 9 | |
| MD5-32 | 0.33 GB/s| 10 | Ronald L.Rivest |
| SHA1-32 | 0.28 GB/s| 10 | |
Q.Score is a measure of quality of the hash function.
It depends on successfully passing SMHasher test set.
10 is a perfect score.
Algorithms with a score < 5 are not listed on this table.
A new version, XXH64, has been created thanks to [Mathias Westerdahl]('s contribution,
which offers superior speed and dispersion for 64-bits systems.
Note however that 32-bits applications will still run faster using the 32-bits version.
SMHasher speed test, compiled using GCC 4.8.2, on Linux Mint 64-bits.
The reference system uses a Core i5-3340M @2.7GHz
| Version | Speed on 64-bits | Speed on 32-bits |
| XXH64 | 13.8 GB/s | 1.9 GB/s |
| XXH32 | 6.8 GB/s | 6.0 GB/s |
<a name="other-languages"></a>
## Multiple languages
The following versions produce xxHash-compatible results in different languages.
|Language |Author |URL |
|-- |-- |-- |
|__Java__ (XXH32) |Adrien Grand | |
|__Java__ (XXH64) |Vsevolod Tolstopyatov|
|__JavaScript__ (pure) |Pierre Curto | |
|__JavaScript__ (nodeJS) |Brian White | |
|__JSX__ (static JavaScript)|Yoshiki Shibukawa | |
|__C#__ (XXH32) |Seok-ju Yun | |
|__C#__ (XXH64) |Brandon Dahler |
|__C#__ (endian independent)|Otaku |
|__C#__ (.net std 2.0) |Sedat Kapanoğlu |
|__C++ 14__ |Red Gavin |
|__Python__ (XXH32) |Ewen Cheslack-Postava|
|__Python__ (XXH64) |Yue Du | |
|__PHP__ |Nir Heimann | |
|__PHP7__ |Craig R Megasaxon | |
|__PHP__ (pure) |Scott Dutton | |
|__Perl__ |Sanko Robinson | |
|__Ruby__ (pure) |Justin W Smith |
|__Ruby__ (wrapper) |Vasiliy Ermolovich |
|__Ruby__ (digest::class) |konsolebox |
|__Swift__ |Daisuke T |
|__Pascal__ |Vojtěch Čihák |
|__R__ |Dirk Eddelbuettel |
|__Go__ (XXH32) |Stéphane Bunel |
|__Go__ (XXH64) |Ahmed Waheed |
|__Go + ASM__ |Caleb Spare |
|__D__ |Masahiro Nakagawa |
|__Lua__ (binding) |Masatoshi Teruya |
|__Lua__ (jit, XXH32) |szensk |
|__Lua__ (jit, XXH64) |Soojin Nam |
|__Rust__ |Jake Goulding |
|__Erlang__ |Pierre Matri |
|__Haskell__ |Christian Marie |
|__PicoLisp__ |Mike Mihailp |
|__Elixir__ |Mykola Konyk |
|__Tcl__ (XXH32, pure) |D. Bohdan |
|__Bash__ (pure) |Devin Hussey |
|__Crystal__ |Lucjan Suski |
<a name="references"></a>
## xxHash is used by
#### Databases
<div id="xxhashusedby_databases" class="container">
<ul class="list-inline">
<li><a href="" ><img src="images/logo50/prestoDB.png" /><span> PrestoDB</span></a></li>
<li><a href="" ><img src="images/logo50/rocksdb.png" /><span> RocksDB</span></a></li>
<li><a href="" ><img src="images/logo50/mysql.png" /><span> MySQL</span></a></li>
<li><a href="" ><img src="images/logo50/arangoDB.png" /><span> ArangoDB</span></a></li>
<li><a href="" ><img src="images/logo50/pgroonga.png" /><span> PGroonga</span></a></li>
<li><a href="" ><img src="images/logo50/spark.png" /><span> Spark</span></a></li>
#### Games
<div id="xxhashusedby_games" class="container">
<ul class="list-inline">
<li><a href="" ><img src="images/logo50/cocos2D.png" /><span> Cocos2D</span></a></li>
<li><a href="" ><img src="images/logo50/ppsspp.png" /><span> PPSSPP</span></a></li>
<li><a href="" ><img src="images/logo50/dolphin.png" /><span> Dolphin</span></a></li>
<li><a href="" ><img src="images/logo50/lwjgl.png" /><span> LWJGL</span></a></li>
<li><a href=""><img src="images/logo50/cxbx.png" /><span> Cxbx-reloaded</span></a></li>
<li><a href=""><span> Freecell Solver</span></a></li>
#### Filters
<div id="xxhashusedby_filters" class="container">
<ul class="list-inline">
<li><a href="" ><img src="images/logo50/pfsense.png" /><span> pfSense</span></a></li>
<li><a href="" ><img src="images/logo50/rspamd.png" /><span> Rspamd</span></a></li>
<li><a href=""><img src="images/logo50/placeholder.png"/><span> fio</span></a></li>
<li><a href=""><img src="images/logo50/placeholder.png"/><span> bloomxx</span></a></li>
<li><a href=""><img src="images/logo50/placeholder.png"/><span> C & Python Bloom Filter</span></a></li>
<li><a href=""><img src="images/logo50/mozilla.png"/><span> LUA Bloom Filter</span></a></li>
#### File Transfer
<div class="container">
<ul class="list-inline">
<li><a href=""><img src="images/logo50/netflix.png" /><span> Netflix</span></a></li>
<li><a href="" ><img src="images/logo50/lz4.png" /><span> LZ4</span></a></li>
<li><a href="" ><img src="images/logo50/silverstack.png" /><span> Silverstack</span></a></li>
<li><a href=""><img src="images/logo50/rapidcopy.png"/><span> Rapidcopy</span></a></li>
<li><a href=""> <img src="images/logo50/syncFactory.png" /><span> Hedge</span></a></li>
<li><a href=""><img src="images/logo50/fastcopy.png" /><span> fastcopy</span></a></li>
<li><a href=""><img src="images/logo50/teracopy.png"/><span> TeraCopy</span></a></li>
<li><a href=""> <img src="images/logo50/hammer.png" /><span> Hammer 2</span></a></li>
#### Other
<div id="xxhashusedby_other" class="container">
<ul class="list-inline">
<li><a href=""><img src="images/logo50/linux.png"/><span> Linux</span></a></li>
<li><a href=""><img src="images/logo50/azure50.png"/><span> Microsoft Azure</span></a></li>
<li><a href=""><img src="images/logo50/microsoft.png"/><span> Visual Studio</span></a></li>
<li><a href="" ><img src="images/logo50/freebsd.png" /><span> PKG</span></a></li>
<li><a href="" ><img src="images/logo50/qemu.png" /><span> Qemu</span></a></li>
<li><a href="" ><img src="images/logo50/xpra.png" /><span> Xpra</span></a></li>
<li><a href="" ><img src="images/logo50/teamviewer.png" /><span> TeamViewer</span></a></li>
<li><a href="" ><img src="images/logo50/factor.png" /><span> Factor</span></a></li>
<li><a href=""><img src="images/logo50/nvbio.png" /><span> nVBio</span></a></li>
<li><a href=""> <img src="images/logo50/placeholder.png" /><span> dvisvgm</span></a></li>
<li><a href=""> <img src="images/logo50/fastbuild.png" /><span> FastBuild</span></a></li>
<li><a href=""> <img src="images/logo50/keypirinha.png" /><span> Keypirinha</span></a></li>
<li><a href=""> <img src="images/logo50/quickhash.png" /><span> QuickHash</span></a></li>
### Special Thanks to
[Takayuki Matsuoka](
who created the canvas for this webpage (based on [lz4](
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src=""></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src=""></script>
<script src="strapdown/v/0.2/strapdown.js"></script>
<!-- Chart -->
<script src=""></script>
<script src="js/rendercharts.js"></script>