tiny.preserves.valueHash
Defined in tiny.preserves.
Returns the value's 64-bit hash, the same answer as v.hash().
Source
Source: lib/preserves/src/any.zig:80
zig
/// Returns the value's 64-bit hash, the same answer as `v.hash()`. Code that needs the hash as a/// plain function passes this. The hash is Wyhash with seed 0 over the value's kind and contents./// Sets and dictionaries feed their elements in ascending order under `compare`, so equal values/// hash equally whatever their storage order. An embedded value hashes through its table of/// functions, or by the address of its payload when it has no table. The call allocates nothing./// Its cost on a set grows with the square of the set's size.pub fn valueHash(v: AnyValue) u64 { return v.hash();}Source: lib/preserves/src/root.zig:183
zig
pub const valueHash = any.valueHash;Audit
| Definitions | 1 |
|---|---|
| Public names | 1 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |