summaryrefslogtreecommitdiff
path: root/indra/llcommon/lluuid.cpp
diff options
context:
space:
mode:
authorHenri Beauchamp <sldevel@users.noreply.github.com>2023-02-07 13:51:53 +0100
committerGitHub <noreply@github.com>2023-02-07 14:51:53 +0200
commit1eb2b23f4b254052924b198d446c052df9ca3124 (patch)
tree0693ffa2dd5bbc83f798cef02bc01d273c943fc3 /indra/llcommon/lluuid.cpp
parent61b93e778bf58f6db4d2f3d8dd6ec67de25598ea (diff)
SL-19159 Faster LLUUID and LLMaterialID hashing for std and boost containers keys (#70)
LLUUID and LLMaterialID already have an excellent entropy and value dispersion; there is therefore strictly no need to further (slowly) hash their value for use with std and boost libraries containers. This commit adds a trivial getDigest64() method to both LLUUID and LLMaterialID (which simply returns the XOR of the two 64 bits long words their value is made of), and uses it in std::hash and hash_value() specializations for use with containers.
Diffstat (limited to 'indra/llcommon/lluuid.cpp')
-rw-r--r--indra/llcommon/lluuid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/indra/llcommon/lluuid.cpp b/indra/llcommon/lluuid.cpp
index 8ff6c45760..aa8045e6ab 100644
--- a/indra/llcommon/lluuid.cpp
+++ b/indra/llcommon/lluuid.cpp
@@ -878,7 +878,7 @@ U32 LLUUID::getRandomSeed()
seed[7]=(unsigned char)(pid);
getSystemTime((uuid_time_t *)(&seed[8]));
- U64 seed64 = HBXXH64((const void*)seed, 16).digest();
+ U64 seed64 = HBXXH64::digest((const void*)seed, 16);
return U32(seed64) ^ U32(seed64 >> 32);
}