From 9438ef5f79fdac11080c3fa10c518e335fd7d8d6 Mon Sep 17 00:00:00 2001 From: Henri Beauchamp Date: Tue, 31 Jan 2023 17:42:51 +0100 Subject: 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. --- autobuild.xml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'autobuild.xml') diff --git a/autobuild.xml b/autobuild.xml index bc78e5c5e0..8e83419a9a 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2816,6 +2816,36 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors version 0.54.1.555529 + xxhash + + copyright + Copyright 2012-2020 Yann Collet + description + xxHash Extremely fast hash algorithm + license + bsd + license_file + LICENSES/xxhash.txt + name + xxhash + platforms + + common + + archive + + hash + f54f21dda4ce25b112f0cc7b4ce38bba + url + http://sldev.free.fr/libraries/xxhash-0.8.1-20230124.tar.bz2 + + name + common + + + version + 0.8.1 + zlib-ng canonical_repo -- cgit v1.3 From 851815442625f0378cb21ffdb8dd588122087e18 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 31 Jan 2023 18:48:16 +0200 Subject: SL-19110 Fix xxhash build link and properly register contribution --- autobuild.xml | 4 ++-- doc/contributions.txt | 1 + indra/llcommon/hbxxh.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'autobuild.xml') diff --git a/autobuild.xml b/autobuild.xml index 8e83419a9a..d4d5e08bcb 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2835,9 +2835,9 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors archive hash - f54f21dda4ce25b112f0cc7b4ce38bba + e4f77ba0a9b8ec3cc3fabc51c4da81d2 url - http://sldev.free.fr/libraries/xxhash-0.8.1-20230124.tar.bz2 + https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/110070/956941/xxhash-0.8.1.578006-windows-578006.tar.bz2 name common diff --git a/doc/contributions.txt b/doc/contributions.txt index e0c6e9cf7e..c6c7ea8f53 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -585,6 +585,7 @@ Henri Beauchamp VWR-1406 VWR-4157 SL-15175 + SL-19110 herina Bode Hikkoshi Sakai VWR-429 diff --git a/indra/llcommon/hbxxh.cpp b/indra/llcommon/hbxxh.cpp index e94581d415..a2c09ff929 100644 --- a/indra/llcommon/hbxxh.cpp +++ b/indra/llcommon/hbxxh.cpp @@ -34,7 +34,7 @@ // in your build, in which case the latter would be used instead. For ARM64 // builds, this would also automatically enable NEON vectorization. #define XXH_INLINE_ALL -#include "xxhash.h" +#include "xxhash/xxhash.h" #include "hbxxh.h" -- cgit v1.3