|
Infinity Engine v0.6.20
C++ API Documentation
|
Functions | |
| uint64_t INFINITY_API_PUBLIC | hash64 (const char *s, size_t len) |
| Computes a 64-bit hash of a byte sequence using CityHash64. | |
| uint64_t INFINITY_API_PUBLIC Infinity::Types::Util::hash64 | ( | const char * | s, |
| size_t | len | ||
| ) |
Computes a 64-bit hash of a byte sequence using CityHash64.
Provides a fast, high-quality hash function based on Google's CityHash64 algorithm. CityHash is designed for speed on modern CPUs and produces well-distributed hash values suitable for hash tables, checksums, and fingerprinting.
This function is used throughout the Infinity Engine for:
The hash is deterministic (same input always produces same output) and stable across platforms and runs, making it suitable for serialization and persistent storage where consistent hash values are required.
Example usage:
| s | Pointer to the byte sequence to hash. |
| len | Length of the byte sequence in bytes. |