summaryrefslogtreecommitdiff
path: root/indra/cmake/xxHash.cmake
diff options
context:
space:
mode:
authorHenri Beauchamp <sldevel@users.noreply.github.com>2023-01-31 17:42:51 +0100
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-01-31 22:04:14 +0200
commit473ade269628d1fb6cbc7b96a91e1c0aec1b8e59 (patch)
tree5e3347164dbffdb8c73b9a58c94fff75eb221aac /indra/cmake/xxHash.cmake
parentc154f4f6da10df693cbe15e0fe291d5b3c423d32 (diff)
SL-19110 Fast hashing classes for use in place of the slow LLMD5, where speed matters. (#64)
This commit adds the HBXX64 and HBXX128 classes for use as a drop-in replacement for the slow LLMD5 hashing class, where speed matters and backward compatibility (with standard hashing algorithms) and/or cryptographic hashing qualities are not required. It also replaces LLMD5 with HBXX* in a few existing hot (well, ok, just "warm" for some) paths meeting the above requirements, while paving the way for future use cases, such as in the DRTVWR-559 and sibling branches where the slow LLMD5 is used (e.g. to hash materials and vertex buffer cache entries), and could be use such a (way) faster algorithm with very significant benefits and no negative impact. Here is the comment I added in indra/llcommon/hbxx.h: // HBXXH* classes are to be used where speed matters and cryptographic quality // is not required (no "one-way" guarantee, though they are likely not worst in // this respect than MD5 which got busted and is now considered too weak). The // xxHash code they are built upon is vectorized and about 50 times faster than // MD5. A 64 bits hash class is also provided for when 128 bits of entropy are // not needed. The hashes collision rate is similar to MD5's. // See https://github.com/Cyan4973/xxHash#readme for details.
Diffstat (limited to 'indra/cmake/xxHash.cmake')
-rw-r--r--indra/cmake/xxHash.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/cmake/xxHash.cmake b/indra/cmake/xxHash.cmake
new file mode 100644
index 0000000000..a7c1cba62c
--- /dev/null
+++ b/indra/cmake/xxHash.cmake
@@ -0,0 +1,8 @@
+# -*- cmake -*-
+if (XXHASH_CMAKE_INCLUDED)
+ return()
+endif (XXHASH_CMAKE_INCLUDED)
+set (XXHASH_CMAKE_INCLUDED TRUE)
+
+include(Prebuilt)
+use_prebuilt_binary(xxhash)