Add __attribute__((noescape)) on pointers in public API #782
No reviewers
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!782
Loading…
Reference in a new issue
No description provided.
Delete branch "dev"
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?
LLVM only at the moment.
Without LTO its the only way to inform the compiler that the pointer does not become globally visible due to the function call.
Results for 5-runs attached.
For XXH128 no regression on M1.
For xxh3 ~0-11% latency improvement on M1 and 0-3% tput improvement:
@ -743,6 +743,18 @@ XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canoni# define XXH_FALLTHROUGH /* fallthrough */nit:
NOESCAPEInteresting. I did not know the
noescapeattribute.I wonder if it's somehow implied when employing the
restrictqualifier.I don't think so: https://godbolt.org/z/dYeshYbaz
@ -743,6 +743,18 @@ XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canoni# define XXH_FALLTHROUGH /* fallthrough */Fixed in V2.
@ -743,6 +743,18 @@ XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canoni# define XXH_FALLTHROUGH /* fallthrough */nit: almost there ... :)
@ -743,6 +743,18 @@ XXH_PUBLIC_API XXH_PUREF XXH32_hash_t XXH32_hashFromCanonical(const XXH32_canoni# define XXH_FALLTHROUGH /* fallthrough */oof... fixed in v3...