1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/// A hash function producing a 32 bit hash for `k`, using `seed` as the initial
/// hasher state.
///
/// This implementation makes use of the [`_mm_crc32_u32`] intrinsic available
/// on x86_46 platforms that support SSE4.2 or higher.
///
/// The non-simd fallback implementation uses the [Fowler–Noll–Vo hash] and can
/// be used by disabling the `simd` crate feature.
///
/// [`_mm_crc32_u32`]: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_crc32_u32&expand=1287
/// [Fowler–Noll–Vo hash]: http://www.isthe.com/chongo/tech/comp/fnv/index.html
/// A hash function producing a 32 bit hash for `k`, using `seed` as the initial
/// hasher state.
///
/// This is a fallback implementation for platforms that do not support the
/// [`_mm_crc32_u32`] intrinsic. It makes use of the [Fowler–Noll–Vo hash]
/// function which is extremely quick at hashing small amounts of data.
///
/// [`_mm_crc32_u32`]: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm_crc32_u32&expand=1287
/// [Fowler–Noll–Vo hash]: http://www.isthe.com/chongo/tech/comp/fnv/index.html