optimization: migrate SipHashUint256 to PresaltedSipHasher

Replaces standalone `SipHashUint256` with an `operator()` overload in `PresaltedSipHasher`.
Updates all hasher classes (`SaltedUint256Hasher`, `SaltedTxidHasher`, `SaltedWtxidHasher`) to use `PresaltedSipHasher` internally, enabling the same constant-state caching optimization while keeping behavior unchanged.

Benchmark was also adjusted to cache the salting part.
This commit is contained in:
Lőrinc
2025-09-30 20:58:19 -04:00
parent ec11b9fede
commit 9ca52a4cbe
8 changed files with 45 additions and 55 deletions

View File

@@ -118,7 +118,7 @@ FUZZ_TARGET(integer, .init = initialize_integer)
}
(void)MillisToTimeval(i64);
(void)SighashToStr(uch);
(void)SipHashUint256(u64, u64, u256);
(void)PresaltedSipHasher(u64, u64)(u256);
(void)PresaltedSipHasher(u64, u64)(u256, u32);
(void)ToLower(ch);
(void)ToUpper(ch);