BendMlLlama.hash32: def of bend-ml-llama@0.2.1.0 Import: import bend-ml-llama@0.2.1.0/main.bend as BendMlLlama Lines 1120-1126 of bend-ml-llama@0.2.1.0/main.bend: https://jend.leeeet.dev/read.txt?path=bend-ml-llama@0.2.1.0/main.bend&start_line=1120&end_line=1126 import Base # Chris Wellons' lowbias32 hash (public domain): xor-shifts and two odd multipliers, a bijection on U32 def hash32(+x: U32) -> U32: +a = U32.xor(x, U32.shrn(x, 16n)) +b = U32.mul(a, 2146121005) +c = U32.xor(b, U32.shrn(b, 15n)) +d = U32.mul(c, 2221713035) U32.xor(d, U32.shrn(d, 16n)) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor