File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
compiler/rustc_data_structures/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,13 @@ const BUFFER_SIZE_BYTES_SPILL: usize = BUFFER_SIZE_ELEMS_SPILL * ELEM_SIZE;
1515const BUFFER_SPILL_INDEX : usize = BUFFER_SIZE_ELEMS_SPILL - 1 ;
1616
1717#[ derive( Debug , Clone ) ]
18+ #[ repr( C ) ]
1819pub struct SipHasher128 {
20+ // The access pattern during hashing consists of accesses to `nbuf` and
21+ // `buf` until the buffer is full, followed by accesses to `state` and
22+ // `processed`, and then repetition of that pattern until hashing is done.
23+ // This is the basis for the ordering of fields below. However, in practice
24+ // the cache miss-rate for data access is extremely low regardless of order.
1925 nbuf : usize , // how many bytes in buf are valid
2026 buf : [ MaybeUninit < u64 > ; BUFFER_SIZE_ELEMS_SPILL ] , // unprocessed bytes le
2127 state : State , // hash State
You can’t perform that action at this time.
0 commit comments