Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Pure perl Jenkins 32 bit Hash

by huck (Prior)
on Nov 18, 2017 at 02:56 UTC ( [id://1203717]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1203717]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found