Skip to content

Commit 07e3f4d

Browse files
committed
nthash.hpp: removed extra op in rolling function
1 parent b5a1044 commit 07e3f4d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

nthash.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,8 @@ inline uint64_t NTR64(const uint64_t rhVal, const unsigned k, const unsigned cha
136136
uint64_t rBits = seedTab[charIn&cpOff] & 0x1FFFFFFFF;
137137
uint64_t sIn = (rol31(lBits,k) << 33) | (rol33(rBits,k));
138138
uint64_t hVal = rhVal ^ sIn;
139+
hVal ^= seedTab[charOut&cpOff];
139140
hVal = ror1(hVal);
140-
uint64_t sOut = ror1(seedTab[charOut&cpOff]);
141-
hVal ^= sOut;
142141
hVal = swapbits3263(hVal);
143142
return hVal;
144143
}

0 commit comments

Comments
 (0)