> On 5 December 2012 02:28, bulk88 <bul...@hotmail.com> wrote:>> http://perl5.git.perl.org/perl.git/commit/3db6cbfca39da94d152d3e860e2aa79b9c6bb161>> why? what are the disadvantages?> > Murmurhash has been broken. It is too easy to attack. We cant use it> as the default hash for perl.> > SipHash is secure and relatively fast. One-at-a-time we believe is> relatively secure at least with the modification I made to it earlier> this year.> > SipHash relies on 64 bit types, so cannot build on a 32 bit computer.> > Thus I made the default be SipHash for 64 bit builds and 32 bit builds> will continue to use One-at-a-time.> >> What is the difference between a 64 build>> and a 32 bit build? What about compilers/platforms that have compiler>> emulated 64 bit integers, like 32 bit x86?> > If someone can figure out how to build SipHash in this situations it> would be nice.> > Cheers,> Yves>
Perl can be built with emulated 64 bit ints ( USE_64_BIT_INT, I know
Cygwin Perls by default have 64 bit IVs on 32 bit x86). These emulated
64 bit ints are slower than 32 bit ints since the compiler emulates them
with function calls. For an actual example, here is the code a Win32
compiler uses to emulate a 64 bit int multiply
http://www.jbox.dk/sanos/source/lib/llmul.asm.html . Maybe you should
use a combination of pointer size (which is always native to the CPU),
and U64 to select the correct hash algorithm, if the pointer is 32 bits,
then the hash algo should be the 32 bit one. But, what about non-x86
CPUs that might have native 64 bit ints but 32 bit memory?
I think I saw some benchmarks on the different hash algorithms a month
or 2 ago on the ML someone posted but I can't find the post.