For small slices Rust sorts with a fixed branchless sorting network - Dobbelaere’s optimal 13-element network - because mispredicted branches cost more than the extra comparisons.
Rust’s SipHash-1-3 stores its four state words as v0, v2, v1, v3 - a field order chosen so the compiler can auto-vectorise the ARX round into two SIMD lanes.
Rust’s HashMap uses a SwissTable with SSE2 group scanning: one movemask compares 16 control bytes at once, and the top 7 bits of the hash act as a filter before any key comparison.
Rust’s in-place collect reuses the source Vec’s allocation when the iterator and element sizes allow it, turning map+collect into a loop with no allocation.
Rust’s RawVec keeps its capacity in a niche-typed UsizeNoHighBit, making Vec three words, with a growth policy of max(2*cap, required) and a tiny-vector minimum of 8 bytes for u8.