This is an implementation of the xxHash algorithm in haskell.
It's about as fast as an alder32 checksum written in C (zlib).
You can find benchmarks here.
Haskell implementation of the XXHash algorithm
License: Other
This is an implementation of the xxHash algorithm in haskell.
It's about as fast as an alder32 checksum written in C (zlib).
You can find benchmarks here.
Is there any particular reason why you builds exclude base-4.9.0.0
? (http://packdeps.haskellers.com/feed?needle=xxhash) I see no reason why the package shouldn't build with that library, and the current restriction breaks builds with GHC 8.0.x.
As seen on the stackage build server (building with ghc-8.2):
Building benchmark 'bench' for xxhash-0.0.2..
[1 of 1] Compiling Main ( bench/Bench.hs, dist/build/bench/bench-tmp/Main.o )
bench/Bench.hs:17:10: error:
• No instance for (GHC.Generics.Generic M32.Hash32)
arising from a use of ‘Control.DeepSeq.$dmrnf’
• In the expression: Control.DeepSeq.$dmrnf @M32.Hash32
In an equation for ‘rnf’: rnf = Control.DeepSeq.$dmrnf @M32.Hash32
In the instance declaration for ‘NFData M32.Hash32’
|
17 | instance NFData M32.Hash32
| ^^^^^^^^^^^^^^^^^
Would you be interested in merging changes that permitted hashing of arbitrary Hashable
types from my hashabler
package? The resulting hash functions would look something like:
xxHash :: Hashable a=> a -> XXHash
where a
may also be ByteString
. This would allow hashing of arbitrary haskell values in a performant way (without needing to marshal to a bytestring first), and cross-platform consistent way, etc.
Let me know if you're interested and would like more details about what that might look like.
As it has some xxhash bundled:
xxhash ‰ cabal bench
Build profile: -w ghc-8.10.1 -O1
In order, the following will be built (use -v for more details):
- xxhash-0.0.2 (bench:bench) (first run)
Preprocessing benchmark 'bench' for xxhash-0.0.2..
Building benchmark 'bench' for xxhash-0.0.2..
Linking /tmp/xxhash/dist-newstyle/build/x86_64-linux/ghc-8.10.1/xxhash-0.0.2/b/bench/build/bench/bench ...
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/ghc-8.10.1/rts/libHSrts.a(xxhash.o): in function `XXH32':
/var/tmp/portage/dev-lang/ghc-8.10.1/work/ghc-8.10.1/rts/xxhash.c:321:0: error:
multiple definition of `XXH32'; /tmp/xxhash/dist-newstyle/build/x86_64-linux/ghc-8.10.1/xxhash-0.0.2/build/libHSxxhash-0.0.2-inplace.a(xxhash.o):xxhash.c:(.text+0x0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/ghc-8.10.1/rts/libHSrts.a(xxhash.o): in function `XXH32_update':
/var/tmp/portage/dev-lang/ghc-8.10.1/work/ghc-8.10.1/rts/xxhash.c:437:0: error:
multiple definition of `XXH32_update'; /tmp/xxhash/dist-newstyle/build/x86_64-linux/ghc-8.10.1/xxhash-0.0.2/build/libHSxxhash-0.0.2-inplace.a(xxhash.o):xxhash.c:(.text+0x1e0): first defined here
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/ghc-8.10.1/rts/libHSrts.a(xxhash.o): in function `XXH32_digest_endian':
/var/tmp/portage/dev-lang/ghc-8.10.1/work/ghc-8.10.1/rts/xxhash.c:451:0: error:
multiple definition of `XXH32_digest'; /tmp/xxhash/dist-newstyle/build/x86_64-linux/ghc-8.10.1/xxhash-0.0.2/build/libHSxxhash-0.0.2-inplace.a(xxhash.o):xxhash.c:(.text+0x460): first defined here
collect2: error: ld returned 1 exit status
`x86_64-pc-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1)
xxh3 is included in newer xxhash and has increased performance. Could the bundled library be updated?
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.