simd-r-drive 0.1.0-alpha3

Key-based binary storage in a single file. SIMD-optimized append-only schema-less storage engine.
Documentation
use xxhash_rust::xxh3::xxh3_64;

/// Computes a 64-bit hash for the given key using XXH3.
///
/// XXH3 is a high-performance, non-cryptographic hash function optimized for speed
/// and efficiency. It leverages SIMD (Single Instruction, Multiple Data) and
/// hardware acceleration when available (e.g., AVX2, NEON) for even faster hashing.
/// This function provides a fast way to generate a unique identifier for a given
/// byte slice, making it suitable for key indexing in hash maps.
///
/// # Parameters
/// - `key`: A byte slice representing the key to be hashed.
///
/// # Returns
/// - A `u64` hash value derived from the input key.
#[inline]
pub fn compute_hash(key: &[u8]) -> u64 {
    xxh3_64(key)
}