MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / HashString

Function HashString

internal/utils/fnv/hash.go:12–19  ·  view source on GitHub ↗

HashString 非unique Hash

(key string)

Source from the content-addressed store, hash-verified

10// HashString
11// 非unique Hash
12func HashString(key string) uint64 {
13 var hash = offset64
14 for _, b := range key {
15 hash ^= uint64(b)
16 hash *= prime64
17 }
18 return hash
19}
20
21// Hash
22// 非unique Hash

Callers 10

TestHashFunction · 0.92
BenchmarkHashStringFunction · 0.92
BenchmarkHashString_LongFunction · 0.92
UniqueKeyFunction · 0.92
indexForKeyMethod · 0.92
getStoreMethod · 0.92
GetDBIndexMethod · 0.92
GetDBMethod · 0.92
doOriginRequestMethod · 0.92
ParseMethod · 0.92

Calls

no outgoing calls

Tested by 3

TestHashFunction · 0.74
BenchmarkHashStringFunction · 0.74
BenchmarkHashString_LongFunction · 0.74