C++20 constexpr implementation of XXH3 #527
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#527
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?
Hello, I'd like to share my C++20 constexpr implementation of XXH3, in case someone is interested. It's available at https://github.com/chys87/constexpr-xxh3
I have implemented
XXH3_64bits,XXH3_64bits_withSecret,XXH3_64bits_withSeed, and they produce exactly the same results as the xxHash library. The 128-bit version needs more work.My project is inspired by @ekpyron and @t-mat's excellent constexpr implementations of XXH64 and XXH32. (See: https://github.com/ekpyron/xxhashct and https://github.com/Cyan4973/xxHash/issues/496). Many thanks to them!
XXH3 is considered a better hash function than XXH32 and XXH64, but I didn't find any constexpr implementation of it online, so I took some time to write one myself. I'm sharing it here in case someone else is also looking for it.
constexpr-xxh3has been added to the list ofxxhashforks.