twmb / murmur3 Goto Github PK
View Code? Open in Web Editor NEWFast, fully fledged murmur3 in Go.
License: Other
Fast, fully fledged murmur3 in Go.
License: Other
210dd31
go version go1.18 gccgo (GCC) 13.1.1 20230429 linux/amd64
go build
# github.com/twmb/murmur3
./murmur128_amd64.s: Assembler messages:
./murmur128_amd64.s:4: Error: no such instruction: `text ·SeedSum128(SB),$0-56'
./murmur128_amd64.s:5: Error: junk `(FP)' after expression
./murmur128_amd64.s:5: Error: junk `(FP)' after expression
./murmur128_amd64.s:5: Error: operand size mismatch for `movq'
./murmur128_amd64.s:6: Error: junk `(FP)' after expression
./murmur128_amd64.s:6: Error: junk `(FP)' after expression
./murmur128_amd64.s:6: Error: operand size mismatch for `movq'
./murmur128_amd64.s:7: Error: junk `(FP)' after expression
./murmur128_amd64.s:7: Error: junk `(FP)' after expression
./murmur128_amd64.s:7: Error: operand size mismatch for `movq'
./murmur128_amd64.s:8: Error: junk `(FP)' after expression
./murmur128_amd64.s:8: Error: junk `(FP)' after expression
./murmur128_amd64.s:8: Error: operand size mismatch for `movq'
./murmur128_amd64.s:9: Error: junk `(FP)' after expression
./murmur128_amd64.s:9: Error: operand type mismatch for `lea'
./murmur128_amd64.s:13: Error: no such instruction: `text ·Sum128(SB),$0-40'
./murmur128_amd64.s:14: Error: operand size mismatch for `xor'
./murmur128_amd64.s:15: Error: operand size mismatch for `xor'
./murmur128_amd64.s:16: Error: junk `(FP)' after expression
./murmur128_amd64.s:16: Error: junk `(FP)' after expression
./murmur128_amd64.s:16: Error: operand size mismatch for `movq'
./murmur128_amd64.s:17: Error: junk `(FP)' after expression
./murmur128_amd64.s:17: Error: junk `(FP)' after expression
./murmur128_amd64.s:17: Error: operand size mismatch for `movq'
./murmur128_amd64.s:18: Error: junk `(FP)' after expression
./murmur128_amd64.s:18: Error: operand type mismatch for `lea'
./murmur128_amd64.s:22: Error: no such instruction: `text ·SeedStringSum128(SB),$0-48'
./murmur128_amd64.s:23: Error: junk `(FP)' after expression
./murmur128_amd64.s:23: Error: junk `(FP)' after expression
./murmur128_amd64.s:23: Error: operand size mismatch for `movq'
./murmur128_amd64.s:24: Error: junk `(FP)' after expression
./murmur128_amd64.s:24: Error: junk `(FP)' after expression
./murmur128_amd64.s:24: Error: operand size mismatch for `movq'
./murmur128_amd64.s:25: Error: junk `(FP)' after expression
./murmur128_amd64.s:25: Error: junk `(FP)' after expression
./murmur128_amd64.s:25: Error: operand size mismatch for `movq'
./murmur128_amd64.s:26: Error: junk `(FP)' after expression
./murmur128_amd64.s:26: Error: junk `(FP)' after expression
./murmur128_amd64.s:26: Error: operand size mismatch for `movq'
./murmur128_amd64.s:27: Error: junk `(FP)' after expression
./murmur128_amd64.s:27: Error: operand type mismatch for `lea'
./murmur128_amd64.s:31: Error: no such instruction: `text ·StringSum128(SB),$0-32'
./murmur128_amd64.s:32: Error: operand size mismatch for `xor'
./murmur128_amd64.s:33: Error: operand size mismatch for `xor'
./murmur128_amd64.s:34: Error: junk `(FP)' after expression
./murmur128_amd64.s:34: Error: junk `(FP)' after expression
./murmur128_amd64.s:34: Error: operand size mismatch for `movq'
./murmur128_amd64.s:35: Error: junk `(FP)' after expression
./murmur128_amd64.s:35: Error: junk `(FP)' after expression
./murmur128_amd64.s:35: Error: operand size mismatch for `movq'
./murmur128_amd64.s:36: Error: junk `(FP)' after expression
./murmur128_amd64.s:36: Error: operand type mismatch for `lea'
./murmur128_amd64.s:45: Error: no such instruction: `text sum128internal<>(SB),$0'
./murmur128_amd64.s:46: Error: operand type mismatch for `movq'
./murmur128_amd64.s:47: Error: operand type mismatch for `movq'
./murmur128_amd64.s:49: Error: operand size mismatch for `movq'
./murmur128_amd64.s:53: Error: operand size mismatch for `xor'
./murmur128_amd64.s:56: Error: operand size mismatch for `cmp'
./murmur128_amd64.s:58: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:58: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:58: Error: operand size mismatch for `movq'
./murmur128_amd64.s:59: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:59: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:59: Error: operand size mismatch for `movq'
./murmur128_amd64.s:62: Error: operand size mismatch for `imul'
./murmur128_amd64.s:63: Error: operand size mismatch for `imul'
./murmur128_amd64.s:68: Error: operand size mismatch for `imul'
./murmur128_amd64.s:69: Error: operand size mismatch for `imul'
./murmur128_amd64.s:71: Error: operand size mismatch for `xor'
./murmur128_amd64.s:73: Error: operand size mismatch for `add'
./murmur128_amd64.s:74: Error: operand size mismatch for `xor'
./murmur128_amd64.s:76: Error: junk `(R12)(R12*4)' after expression
./murmur128_amd64.s:76: Error: operand type mismatch for `lea'
./murmur128_amd64.s:78: Error: operand size mismatch for `add'
./murmur128_amd64.s:79: Error: junk `(R13)(R13*4)' after expression
./murmur128_amd64.s:79: Error: operand type mismatch for `lea'
./murmur128_amd64.s:84: Error: operand size mismatch for `movq'
./murmur128_amd64.s:88: Error: operand size mismatch for `xor'
./murmur128_amd64.s:123: Error: no such instruction: `movbqzx 14(SI)(R10*1),AX'
./murmur128_amd64.s:127: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:127: Error: operand size mismatch for `mov'
./murmur128_amd64.s:132: Error: no such instruction: `movbqzx 12(SI)(R10*1),AX'
./murmur128_amd64.s:136: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:136: Error: operand size mismatch for `mov'
./murmur128_amd64.s:137: Error: operand size mismatch for `or'
./murmur128_amd64.s:141: Error: no such instruction: `movbqzx 10(SI)(R10*1),AX'
./murmur128_amd64.s:145: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:145: Error: operand size mismatch for `mov'
./murmur128_amd64.s:149: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:149: Error: operand size mismatch for `mov'
./murmur128_amd64.s:152: Error: operand size mismatch for `imul'
./murmur128_amd64.s:154: Error: operand size mismatch for `imul'
./murmur128_amd64.s:155: Error: operand size mismatch for `xor'
./murmur128_amd64.s:158: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:158: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:158: Error: operand size mismatch for `movq'
./murmur128_amd64.s:162: Error: no such instruction: `movbqzx 6(SI)(R10*1),AX'
./murmur128_amd64.s:166: Error: junk `(SI)(R10*1)' after expression
./murmur128_amd64.s:166: Error: operand size mismatch for `mov'
./murmur128_amd64.s:171: Error: no such instruction: `movbqzx 4(SI)(R10*1),AX'
./murmur128_amd64.s:175: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:175: Error: operand size mismatch for `mov'
./murmur128_amd64.s:176: Error: operand size mismatch for `or'
./murmur128_amd64.s:180: Error: no such instruction: `movbqzx 2(SI)(R10*1),AX'
./murmur128_amd64.s:184: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:184: Error: operand size mismatch for `mov'
./murmur128_amd64.s:188: Error: junk `(R10*1)' after expression
./murmur128_amd64.s:188: Error: operand size mismatch for `mov'
./murmur128_amd64.s:191: Error: operand size mismatch for `imul'
./murmur128_amd64.s:193: Error: operand size mismatch for `imul'
./murmur128_amd64.s:194: Error: operand size mismatch for `xor'
./murmur128_amd64.s:197: Error: operand size mismatch for `xor'
./murmur128_amd64.s:198: Error: operand size mismatch for `xor'
./murmur128_amd64.s:200: Error: operand size mismatch for `add'
./murmur128_amd64.s:201: Error: operand size mismatch for `add'
./murmur128_amd64.s:204: Error: operand size mismatch for `movq'
./murmur128_amd64.s:205: Error: operand size mismatch for `movq'
./murmur128_amd64.s:210: Error: operand size mismatch for `xor'
./murmur128_amd64.s:211: Error: operand size mismatch for `xor'
./murmur128_amd64.s:213: Error: operand type mismatch for `movq'
./murmur128_amd64.s:215: Error: operand size mismatch for `imul'
./murmur128_amd64.s:216: Error: operand size mismatch for `imul'
./murmur128_amd64.s:218: Error: operand size mismatch for `movq'
./murmur128_amd64.s:219: Error: operand size mismatch for `movq'
./murmur128_amd64.s:224: Error: operand size mismatch for `xor'
./murmur128_amd64.s:225: Error: operand size mismatch for `xor'
./murmur128_amd64.s:227: Error: operand type mismatch for `movq'
./murmur128_amd64.s:229: Error: operand size mismatch for `imul'
./murmur128_amd64.s:230: Error: operand size mismatch for `imul'
./murmur128_amd64.s:232: Error: operand size mismatch for `movq'
./murmur128_amd64.s:233: Error: operand size mismatch for `movq'
./murmur128_amd64.s:238: Error: operand size mismatch for `xor'
./murmur128_amd64.s:239: Error: operand size mismatch for `xor'
./murmur128_amd64.s:241: Error: operand size mismatch for `add'
./murmur128_amd64.s:242: Error: operand size mismatch for `add'
./murmur128_amd64.s:244: Error: operand size mismatch for `movq'
./murmur128_amd64.s:245: Error: junk `(BX)' after expression
./murmur128_amd64.s:245: Error: junk `(BX)' after expression
./murmur128_amd64.s:245: Error: operand size mismatch for `movq'
Hello,
The murmur32 hash resets the seed to 0
on setup, so no matter what seed is given, the hash is always calculated for seed 0
.
The SeedNew32
constructor calls Reset()
, which calls reset()
through the bmixer
interface; and this reset()
method always sets the seed to 0
instead of the provided seed.
I have problem using this library on s390x.
Given the following tests using twmb/murmur3: https://github.com/eclipseo/bloom/blob/use_twmb/murmur_test.go
The tests fail on s390x arches triggering the Errorf("Backward compatibillity break."). It works on every other arches I have tested it with (all LittleEndian).
You can see the build.log here: https://koji.fedoraproject.org/koji/taskinfo?taskID=75905883
Do you have any idea what might cause this behavior?
Thanks.
jb@kvin:~/dev/tmp/murmur3 % GOOS=linux GOARCH=386 go build
# github.com/twmb/murmur3
./murmur128_gen.go:16:51: undefined: unsafe
./murmur128_gen.go:25:43: undefined: unsafe
jb@kvin:~/dev/tmp/murmur3 % git describe
v1.1.2
jb@kvin:~/dev/tmp/murmur3 %
The generic implementation does an unsafe conversion from []byte to string.
Frankly I'm not sure the ...String
functions have much use, and the one implementation could instead use byte slices and not need to do this magic. Or the implementation could just be switched to take []byte and the ...String methods could do a non-unsafe conversion or do the "normal" unsafe dance with reflect.SliceHeader and such.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.