Handbook
Glossary
farm64-long ( bytes -- hash )
Vocabulary
checksums
.
farmhash
.
private
Inputs
bytes
an
object
Outputs
hash
an
object
Definition
USING:
accessors
checksums.cityhash.private
kernel
math
math.bitwise
sequences
;
IN:
checksums.farmhash.private
::
farm64-long
( bytes -- hash )
bytes
length
:>
len 81
k1
W*
113
W+
:>
y y
k2
W*
113
W+
shift-mix
k2
W*
:>
z 81
k2
W*
bytes 0
fetch64
W+
y z 0 0 0 0
hash-state
boa
:>
state len 1
-
64
/i
<iota>
[|
i | bytes i 64
*
state
k1
1
hash-round
]
each
k1
state
z>>
255
bitand
1
shift
W+
:>
mul state state
w0>>
len 1
-
63
bitand
W+
>>w0
state
v0>>
state
w0>>
W+
>>v0
state
w0>>
state
v0>>
W+
>>w0
drop
bytes len 64
-
state mul 9
hash-round
state
v0>>
state
w0>>
mul
hash16-mul
state
y>>
shift-mix
k0
W*
W+
state
z>>
W+
state
v1>>
~9 more~
;