Paul Gilmartin <[email protected]> wrote > On Mon, 7 Jul 2025 10:50:58 -0500, Thomas David Rivers wrote: > > > ... > >Note, mumurash is endian-dependent (you get different values on big-endian > >vs. little-endian machines). Also, the 128-bit version does not generate > >the > >same values as the 32-bit version. > > ... > Is either of them correct and standard-conforming? > > Might IBM perceive a negative business case for facilitating > outbound portability? > > -- > gil
The original mumurash C++ implementation by Austin Appleby has this comment in code that fetches 32-bit "blocks" from the data: // Block read - if your platform needs to do endian-swapping or can only // handle aligned reads, do the conversion here So - perhaps I was wrong in my description; as there is a 'hint' that it should handle endian issues (and, it appears that the endian-ness is little-endian like the X86 - so a mainframe implementation needs to byte swap.) It still seems to be true that the 32-bit mumurhash3 produces different results than the 128-bit version... but, perhaps the 32-bit version -should- produce the same result regardless of endianness? The PL/I source I posted would need to be modified on the mainframe to byte-swap values (as would any other implementation) to produce the same results as on x86. I only looked at a couple of source examples, it appears none of them, at least, take this possibility into account... For those interested, the original (C++) implementation of mumurhash is on GitHub at https://github.com/aappleby/smhasher/tree/master - Dave R. - ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
