| 496 | | 496 | |
| 497 | /** | 497 | /** |
| 498 | * Calculates a hash code for a string. | 498 | * Calculates a hash code for a string. |
| | 499 | * cyrb53 (c) 2018 bryc ({@link https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js|github.com/bryc}) |
| | 500 | * License: Public domain (or MIT if needed). Attribution appreciated. |
| | 501 | * A fast and simple 53-bit string hash function with decent collision resistance. |
| | 502 | * Largely inspired by MurmurHash2/3, but with a focus on speed/simplicity. |
| 499 | * @param {string} str The string to hash. | 503 | * @param {string} str The string to hash. |
| 500 | * @param {number} [seed=0] The seed to use for the hash. | 504 | * @param {number} [seed=0] The seed to use for the hash. |
| 501 | * @returns {number} The hash code. | 505 | * @returns {number} The hash code. |