diff options
Diffstat (limited to 'starlark/hashtable.go')
-rw-r--r-- | starlark/hashtable.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starlark/hashtable.go b/starlark/hashtable.go index d425019..27990b5 100644 --- a/starlark/hashtable.go +++ b/starlark/hashtable.go @@ -362,9 +362,9 @@ func hashString(s string) uint32 { //go:linkname goStringHash runtime.stringHash func goStringHash(s string, seed uintptr) uintptr -// softHashString computes the FNV hash of s in software. +// softHashString computes the 32-bit FNV-1a hash of s in software. func softHashString(s string) uint32 { - var h uint32 + var h uint32 = 2166136261 for i := 0; i < len(s); i++ { h ^= uint32(s[i]) h *= 16777619 |