Skip to content

Commit

Permalink
Put in a comment to think about allowing advanced user hashing.
Browse files Browse the repository at this point in the history
  • Loading branch information
c-blake committed Mar 17, 2020
1 parent a706077 commit 508e3b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lpset.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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.} =
Expand Down

0 comments on commit 508e3b9

Please sign in to comment.