runtime: add comments about the hash functions

This commit is contained in:
Damian Gryski
2022-06-15 12:44:21 -07:00
committed by Ron Evans
parent 7a61cb1bc3
commit bcf58c0840
2 changed files with 19 additions and 2 deletions
+7 -2
View File
@@ -1,6 +1,13 @@
//go:build runtime_memhash_tsip
// +build runtime_memhash_tsip
// This is the tsip hash developed by Damian Gryski, based on ideas from SipHash.
// It is slower than leveldb's hash, but should be "stronger".
// https://en.wikipedia.org/wiki/SipHash
// https://github.com/veorq/SipHash
// https://github.com/dgryski/tsip
package runtime
import (
@@ -26,8 +33,6 @@ func ptrToSlice(ptr unsafe.Pointer, n uintptr) []byte {
return p
}
// tsip hash -- github.com/dgryski/tsip
type sip struct {
v0, v1 uint64
}