Database schema optimization - part 1

This commit is contained in:
mdecimus
2025-10-30 19:57:09 +01:00
parent 4919cf55fc
commit 3e1d2d54e4
207 changed files with 3856 additions and 5885 deletions

View File

@@ -76,7 +76,7 @@ impl From<Gram<'_>> for TokenHash {
hash.len = t1.len() as u8;
} else {
let h1 = xxhash_rust::xxh3::xxh3_64(t1).to_be_bytes();
let h2 = farmhash::hash64(t1).to_be_bytes();
let h2 = farmhash::fingerprint64(t1).to_be_bytes();
hash.hash[..std::mem::size_of::<u64>()].copy_from_slice(&h1);
hash.hash[std::mem::size_of::<u64>()..].copy_from_slice(&h2);
hash.len = HASH_LEN as u8;
@@ -99,7 +99,7 @@ impl From<Gram<'_>> for TokenHash {
t1.iter()
.copied()
.chain(xxhash_rust::xxh3::xxh3_64(t2).to_be_bytes().into_iter())
.chain(farmhash::hash64(t2).to_be_bytes().into_iter()),
.chain(farmhash::fingerprint64(t2).to_be_bytes().into_iter()),
) {
*h = b;
}