From 508e3b944b8799ed5065666a7ed2dd790d9e66be Mon Sep 17 00:00:00 2001 From: Charles Blake Date: Tue, 17 Mar 2020 15:09:34 -0400 Subject: [PATCH] Put in a comment to think about allowing advanced user hashing. --- lpset.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lpset.nim b/lpset.nim index b4386d8..fe4b4b8 100644 --- a/lpset.nim +++ b/lpset.nim @@ -53,6 +53,8 @@ when defined(lpWarn) or not defined(danger): # distinct home addr locations that are at least as independent as `hashAddr`. proc hashHc[A](s: LPSet[A], hc: Hash): Hash {.inline.} = # if s.rehash: Hash(rotateLeftBits(hc * s.salt, 32)) else: hc +#XXX May be better to call this hash2, allow importing environment to override& +# just default it to hashRoMu1, maybe providing salt as an extra argument? if s.rehash: hashRoMu1(hc) xor Hash(s.salt) else: hc proc hash[A](s: LPSet[A], i: int): Hash {.inline.} =