[PATCH] D154812: [Support] Add llvm::xxh3_64bits
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 18 04:39:47 PDT 2023
serge-sans-paille accepted this revision.
serge-sans-paille added a comment.
This revision is now accepted and ready to land.
LGTM with the minor nits mentioned above.
================
Comment at: llvm/include/llvm/Support/xxhash.h:48
+
+uint64_t xxh3_64bits(const void *input, size_t len);
+inline uint64_t xxh3_64bits(llvm::ArrayRef<uint8_t> data) {
----------------
Why exposing this version to the user?
================
Comment at: llvm/lib/Support/xxhash.cpp:3
* xxHash - Fast Hash algorithm
* Copyright (C) 2012-2016, Yann Collet
*
----------------
you should probably update the copyright notice to 2021 to reflect upstream https://github.com/Cyan4973/xxHash/blob/dev/LICENSE#L2
================
Comment at: llvm/lib/Support/xxhash.cpp:38
+
+// xxh3_64bits is based on a version as of July 2023.
----------------
Mention the commit number here?
================
Comment at: llvm/lib/Support/xxhash.cpp:150
+
+#define XXH3_SECRETSIZE_MIN 136
+#define XXH_SECRET_DEFAULT_SIZE 192
----------------
could be `constexpr size_t`
================
Comment at: llvm/lib/Support/xxhash.cpp:197
+
+#define XXH_STRIPE_LEN 64
+#define XXH_SECRET_CONSUME_RATE 8
----------------
same here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154812/new/
https://reviews.llvm.org/D154812
More information about the llvm-commits
mailing list