in reply to Re: Pure perl Jenkins 32 bit Hash
in thread Pure perl Jenkins 32 bit Hash
Are you sure the 32-bit mix4 is correct?
Guess not
$Config{api_versionstring}:5.14.0 $Config{use64bitint}: $Config{ivsize}:4 $Config{byteorder}:1234 $Config{i16size}:2 $Config{i32size}:4 $Config{i64size}:8 $Config{osname}:MSWin32 $Config{osvers}:5.2 $ENV{PROCESSOR_ARCHITECTURE}:X86 orig : 11111111000000001111111111111111 ff00ffff use integer:>>16: 11111111111111111111111100000000 ffffff00 no integer :>>16: 00000000000000001111111100000000 0000ff00 orig : 00001111000000001111111111111111 0f00ffff use integer:>>16: 00000000000000000000111100000000 00000f00 no integer :>>16: 00000000000000000000111100000000 00000f00
Doing low-level unsigned arithmetic can be awkward in perl.
Seems so, this needs more investigation and i dont have a C compiler for that 32bit machine
Thanks for the heads up, I will keep looking deeper
Added:
Re: How to do 'unsigned shift right' in perl? Note that both "<<" and ">>" in Perl are implemented directly using "<<" and ">>" in C. If use integer (see Integer Arithmetic) is in force then signed C integers are used, else unsigned C integers are used.
Added2:
Wow
Ive got the "fix", just like you said, but understanding why it works and "-hash hash3" still doesnt work on 32bit and how mixing IV,UV and possibly NV arithmetic between mix and hash3 is causing the difference hasnt quite gelled yet. I'll be back! Devel::Peek and perlguts will rescue me!
|
|---|