Skip to content

Commit 5f6a61e

Browse files
committed
siphash: Remove one variable
Without this temporary variable, codegen improves slightly and less registers are spilled to the stack in SipHash::write.
1 parent f910d27 commit 5f6a61e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libcore/hash/sip.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ impl SipHasher {
161161

162162
// Buffered tail is now flushed, process new input.
163163
let len = length - needed;
164-
let end = len & (!0x7);
165164
let left = len & 0x7;
166165

167166
let mut i = needed;
168-
while i < end {
167+
while i < len - left {
169168
let mi = unsafe { load_u64_le(msg, i) };
170169

171170
self.v3 ^= mi;

0 commit comments

Comments
 (0)