Skip to content

Commit 5171cc7

Browse files
committed
Auto merge of #77476 - tgnottingham:buffered_siphasher128, r=nnethercote
perf: buffer SipHasher128 This is an attempt to improve Siphasher128 performance by buffering input. Although it reduces instruction count, I'm not confident the effect on wall times, or lack-thereof, is worth the change. --- Additional notes not reflected in source comments: * Implementation choices were guided by a combination of results from rustc-perf and micro-benchmarks, mostly the former. * ~~I tried a couple of different struct layouts that might be more cache friendly with no obvious effect.~~ Update: a particular struct layout was chosen, but it's not critical to performance. See comments in source and discussion below. * I suspect that buffering would be important to a SIMD-accelerated algorithm, but from what I've read and my own tests, SipHash does not seem very amenable to SIMD acceleration, at least by SSE.
2 parents 3e0dd24 + a602d15 commit 5171cc7

File tree

3 files changed

+389
-196
lines changed

3 files changed

+389
-196
lines changed

Diff for: compiler/rustc_data_structures/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#![feature(const_panic)]
2929
#![feature(min_const_generics)]
3030
#![feature(once_cell)]
31+
#![feature(maybe_uninit_uninit_array)]
3132
#![allow(rustc::default_hash_types)]
3233

3334
#[macro_use]

0 commit comments

Comments
 (0)