Migrate twox-hash -> xxhash_rust. Switch to Xxh3 for better performance.
xxhash-rust is more maintained, built against `::core`, so no workaround for wasm is necessary. Switch to Xxh3 for better performance, which shows when loading/hashing image buffers.
This commit is contained in:
parent
751ea77c29
commit
98e088e731
6 changed files with 8 additions and 19 deletions
|
|
@ -16,11 +16,7 @@ pub struct Cache {
|
|||
hasher: HashBuilder,
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
type HashBuilder = twox_hash::RandomXxHashBuilder64;
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
type HashBuilder = std::hash::BuildHasherDefault<twox_hash::XxHash64>;
|
||||
type HashBuilder = xxhash_rust::xxh3::Xxh3Builder;
|
||||
|
||||
impl Cache {
|
||||
/// Creates a new empty [`Cache`].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue