]> git.lizzy.rs Git - rust.git/commit
Revert `u8to64_le` changes from #68914.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 7 Feb 2020 00:53:07 +0000 (11:53 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Thu, 20 Feb 2020 23:11:35 +0000 (10:11 +1100)
commit100ff5a25666a1903113ecff0dc63ad84e5bdff7
tree74c89ca9eef234c4270bcace1c06b18c2134d8d8
parent5e7af4669f80e5f682141f050193ab679afdb4b1
Revert `u8to64_le` changes from #68914.

`SipHasher128`'s `u8to64_le` function was simplified in #68914.
Unfortunately, the new version is slower, because it introduces `memcpy`
calls with non-statically-known lengths.

This commit reverts the change, and adds an explanatory comment (which
is also added to `libcore/hash/sip.rs`). This barely affects
`SipHasher128`'s speed because it doesn't use `u8to64_le` much, but it
does result in `SipHasher128` once again being consistent with
`libcore/hash/sip.rs`.
src/libcore/hash/sip.rs
src/librustc_data_structures/sip128.rs