-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I notice that this uses the simplest implementation of Hasher possible. Functions like write_u16 cast multi-byte numbers to byte-slices without fixing Endianness; this implies one should get different results on Big Endian vs Little Endian machines.
I don't know whether this is the only portability issue (e.g. I don't know if there are any complications if the bytes supplied to write are not sufficiently aligned; presumably only performance).
Now, I'm not sure whether to call the lack of Endianness fixing in Hasher default function impls a bug in the standard library or not, but it's a problem for our use-case (not certain whether we will use MetroHash yet). We could simply wrap with HasherToLE (endian-hasher), but that seems messy.
Your thoughts?