Skip to main content

computeStridedIntegerArrayHash

computeStridedIntegerArrayHash(array, offset, length, stride) ⇒ number

Useful for computing hashes of large arrays, can pick a relevant stride and skip large chunks of memory while still capturing good amount of unique information from evenly-spaced areas of the array

Kind: global function

ParamType
arrayArray.<number> | Uint32Array | Uint16Array | Uint8Array
offsetnumber
lengthnumber
stridenumber

computeStridedIntegerArrayHash~hash : number

Simple hashing scheme, multiplying existing hash by a prime and adding next value (h<<5) - h === h*31

Kind: inner property of computeStridedIntegerArrayHash