xxh_x86dispatch.h not installed when DISPATCH=1 #1058
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#1058
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?
xxh_x86dispatch.his not installed bymake DISPATCH=1 install.It is installed by
make DISPATCH=1 LIBXXH_DISPATCH=1 install.I suspect a copy/paste error?
github.com/Cyan4973/xxHash@7aee8d0a34/Makefile (L633-L635)Should be:
Feel free to close if this is intended behavior. From Readme:
You could create a pull request for this to speed up things...
The naive expectation would be for everything to work under the DISPATCH flag, but keeping LIBXXH_DISPATCH separate appears to have been intentional. (I'd missed the note in the readme when I opened this issue.)
Upon reflection, there shouldn't be any need for third-party projects to use the dispatch header, so maybe ability to install it should be removed from the Makefile entirely? (Or comment added to note it's for internal use/testing only.)
The project I encountered using the dispatch header was likely doing so incorrectly. It does not use any of the exported dispatch symbols.
Then let's wait of upstream to respond, and I will keep the downstream package as is.
Yeah, so, indeed,
DISPATCH=1is specifically for the CLIxxhsum.The dispatch is useful for a case like
xxhsum, because it's a binary compiled once and distributed across a large amount of heterogeneous machines. So it allows runtime adaptation. It's also expected to hash "large" content (at least KB range, frequently more). So that's where dispatch offers most benefits.However, for the library
libxxhash, I expect the dispatch to be less useful, if at all.The expectation is that it's employed in drastically different scenarios, such as hash tables or bloom filter, and the input to hash might be small, if not tiny, or even fixed size. In which case, inlining optimization become important for performance. And dispatch makes things more complex, it can get in the way. At least it makes things more complex for the compiler.
Hence that's why the policy is different.
That being said, just in case someone would think that it's nonetheless useful for their specific usecase, there is an opt-in, with
LIBXXH_DISPATCH=1.