rust/compiler
Tyson Nottingham d061fee177 Stable hashing: add comments and tests concerning platform-independence
SipHasher128 implements short_write in an endian-independent way, yet
its write_xxx Hasher trait methods undo this endian-independence by byte
swapping the integer inputs on big-endian hardware. StableHasher then
adds endian-independence back by also byte-swapping on big-endian
hardware prior to invoking SipHasher128.

This double swap may have the appearance of being a no-op, but is in
fact by design. In particular, we really do want SipHasher128 to be
platform-dependent, in order to be consistent with the libstd SipHasher.
Try to clarify this intent. Also, add and update a couple of unit tests.
2020-09-30 00:57:35 -07:00
..
2020-09-23 21:51:56 +02:00
2020-09-23 22:08:30 +02:00
2020-09-23 21:51:56 +02:00
2020-09-23 21:51:56 +02:00
2020-09-23 21:51:56 +02:00
2020-09-21 05:43:39 +02:00
2020-09-23 21:51:56 +02:00
2020-09-23 21:51:56 +02:00
2020-09-23 21:51:56 +02:00
2020-09-23 21:51:56 +02:00
2020-09-27 15:54:07 +02:00