Skip to content

Commit

Permalink
add rainbow/rainstorm hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Dec 14, 2024
1 parent 908b94f commit cdf0685
Show file tree
Hide file tree
Showing 12 changed files with 717 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,8 @@ add_library(
crc64.c
crcspeed.c
crccombine.c
rainbow_test.cpp
rainstorm_test.cpp
)

add_executable(SMHasher main.cpp)
Expand Down
6 changes: 6 additions & 0 deletions Hashes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1424,3 +1424,9 @@ extern "C" void crc64_jones_test2(const void *input, int len, uint32_t seed, voi
extern "C" void crc64_jones_test3(const void *input, int len, uint32_t seed, void *out);
extern "C" void crc64_jones_default(const void *input, int len, uint32_t seed, void *out);

void rainbow64_test (const void *key, int len, uint32_t seed, void *out);
void rainbow128_test (const void *key, int len, uint32_t seed, void *out);
void rainbow256_test (const void *key, int len, uint32_t seed, void *out);
void rainstorm64_test (const void *key, int len, uint32_t seed, void *out);
void rainstorm128_test (const void *key, int len, uint32_t seed, void *out);
void rainstorm256_test (const void *key, int len, uint32_t seed, void *out);
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ SMhasher
| [komihash](doc/komihash.txt) | 12179.74 | 33.23 | 224.80 (2) |1323 | |
| [polymur](doc/polymur.txt) | 9913.53 | 41.68 | 232.56 (3) |1128 | |
| [gxhash64](doc/gxhash64.txt) | 48919.73 | 36.61 | 236.98 (3) | | AES only |
w| [rainbow](doc/rainbow.txt) | 48919.73 | 36.61 | 236.98 (3) | | |
| [rainbow128](doc/rainbow128.txt) | 48919.73 | 36.61 | 236.98 (3) | | |
| [rainbow256](doc/rainbow256.txt) | 48919.73 | 36.61 | 236.98 (3) | | |
| [rainstorm](doc/rainstorm.txt) | 48919.73 | 36.61 | 236.98 (3) | | |
| [rainstorm128](doc/rainstorm128.txt) | 48919.73 | 36.61 | 236.98 (3) | | |
| [rainstorm256](doc/rainstorm256.txt) | 48919.73 | 36.61 | 236.98 (3) | | |

The sortable table variants:

Expand All @@ -236,6 +242,7 @@ The sortable table variants:
* [fast AMD EPYC 9554P 64-Core Processor (Server from 2024)](https://rurban.github.io/smhasher/doc/epyc.html)
* [Intel i5-2300 2.8GHz](https://rurban.github.io/smhasher/doc/intel.html)
* [AMD Ryzen 5 PRO 3350G 3.6GHz 32bit 32bit](https://rurban.github.io/smhasher/doc/i686.html)
* [AMD Ryzen 3 3200U 3.5GHz](https://rurban.github.io/smhasher/doc/ryzen3.html)
* [Mac Air i7-4650](https://rurban.github.io/smhasher/doc/air.html)
* [Cortex-A53 2GHz (Sony XPeria L4)](https://rurban.github.io/smhasher/doc/phone.html)

Expand Down
48 changes: 48 additions & 0 deletions doc/epyc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,54 @@ <h1 id="smhasher">SMhasher</h1>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow.txt">rainbow</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow128.txt">rainbow128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow256.txt">rainbow256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm.txt">rainstorm</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm128.txt">rainstorm128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm256.txt">rainstorm256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
</tbody>
</table>

Expand Down
48 changes: 48 additions & 0 deletions doc/i7.html
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,54 @@ <h1 id="smhasher">SMhasher</h1>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow.txt">rainbow</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow128.txt">rainbow128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow256.txt">rainbow256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm.txt">rainstorm</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm128.txt">rainstorm128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm256.txt">rainstorm256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
</tbody>
</table>

Expand Down
48 changes: 48 additions & 0 deletions doc/intel.html
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,54 @@ <h1 id="smhasher">SMhasher</h1>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow.txt">rainbow</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow128.txt">rainbow128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow256.txt">rainbow256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm.txt">rainstorm</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm128.txt">rainstorm128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm256.txt">rainstorm256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
</tbody>
</table>

Expand Down
48 changes: 48 additions & 0 deletions doc/ryzen3.html
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,54 @@ <h1 id="smhasher">SMhasher</h1>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow.txt">rainbow</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow128.txt">rainbow128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainbow256.txt">rainbow256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm.txt">rainstorm</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm128.txt">rainstorm128</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
<tr class="good">
<td align="left"><a href="rainstorm256.txt">rainstorm256</a></td>
<td align="right">1017.15</td>
<td align="right">178.25</td>
<td align="right">313.64 (9)</td>
<td align="right"></td>
<td align="left"></td>
</tr>
</tbody>
</table>

Expand Down
6 changes: 6 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,12 @@ HashInfo g_hashes[] =
#endif
{ komihash_test, 64, 0x8157FF6D, "komihash", "komihash 5.10", GOOD, {} },
{ polymur_test, 64, 0x4F894810, "polymur", "github.com/orlp/polymur-hash v1, __SIZEOF_INT128__:" MACRO_ITOA(__SIZEOF_INT128__), GOOD, {} },
{ rainbow64_test, 64, 0x2972C52E, "rainbow", "Rainbow 64-bit v1.0.6 (aka Newhash 128-bit)", GOOD, {} },
{ rainbow128_test, 128, 0xFD9BCADD, "rainbow-128", "Rainbow 128-bit v1.0.6 (aka Newhash 128-bit)", GOOD, {} },
{ rainbow256_test, 256, 0xB327563D, "rainbow-256", "Rainbow 256-bit v1.0.6 (aka Newhash 256-bit)", GOOD, {} },
{ rainstorm64_test, 64, 0xC8DB71D5, "rainstorm", "Rainstorm 64-bit v0.0.6", GOOD, {} },
{ rainstorm128_test, 128, 0x17E0FC1B, "rainstorm-128", "Rainstorm 128-bit v0.0.6", GOOD, {} },
{ rainstorm256_test, 256, 0x8BDBF180, "rainstorm-256", "Rainstorm 256-bit v0.0.6", GOOD, {} },
};

HashInfo * findHash ( const char * name )
Expand Down
Loading

0 comments on commit cdf0685

Please sign in to comment.