axhash 0.1.1

Fast non-cryptographic hash function for Rust with no_std support and strong HashMap performance.
Documentation
1
2
3
4
5
6
7
8
9
#[inline(always)]
pub(crate) unsafe fn read_u32(ptr: *const u8) -> u32 {
    unsafe { u32::from_le(core::ptr::read_unaligned(ptr.cast::<u32>())) }
}

#[inline(always)]
pub(crate) unsafe fn read_u64(ptr: *const u8) -> u64 {
    unsafe { u64::from_le(core::ptr::read_unaligned(ptr.cast::<u64>())) }
}