Could you make a tiny version of the hash function? #956
Labels
No labels
announcement
bug
build
CI
dependencies
documentation
duplicate
enhancement
experience feedback
feature request
github_actions
help wanted
install
invalid
Long-term
optimization
portability
question
target-specific
test issue
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-Cyan4973/xxHash#956
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Basically according to author of SMHasher he said that https://github.com/tidwall/th64 version is similar to hashes like yours but compressed to a few lines (Source: https://news.ycombinator.com/item?id=40877460) .
Got me thinking, how compact could you compress your hash function? Maybe you could place it in your readme for those who want to just copy and paste the hash function with minimum dependencies and don't care about speed.
And if so, how would it compare against th64
Shorter versions of
xxh32andxxh64exist here : https://create.stephan-brumme.com/xxhash/xxh3is larger, partly because it has multiple vector implementations.It's a long term objective to separate
xxhash.hinto multiple smaller sub-modules, in order to allow implementers to pick and choose just the parts they want. See #550. It will require time, which is in short supply.I haven't heard about
th64before. It looks similar to murmurhash3, mildly obfuscated by the use of very compact coding convention.Does it have to be a fast implementation? I think the idea of small copy/paste functions is that it's suitable for those who are simply aiming to get something going with minimum dependencies rather than something that is fast. So that could include small utility functions that run occasionally to embedded systems.
That being said, you could just ask the author of https://create.stephan-brumme.com/xxhash/ if he be willing to have his implementation be placed in your readme?
I think for now, just xxh32 and xx64 would be ideal as a minimum as that's seems to be whats most used out there, but you could always wrap it in
<details><summary></summary></details>tag which is supported in github if you are worried about how large it would take in your readme. (But you may want to expose at least xxhash64 as a nice 'see how simple it is' to the public. Much like how the th64 author did for his.