From 1460eebf2abe913df964e031eff081a57f043697 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 13 Dec 2020 21:07:03 +0100 Subject: Use XXH3 for cache, hash table hashing XXH3 is faster than both our CRC32c implementation as well as DJB hash for hash table hashing, so meh, let's switch to it. --- CMake/FindXXHASH.cmake | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CMake/FindXXHASH.cmake (limited to 'CMake') diff --git a/CMake/FindXXHASH.cmake b/CMake/FindXXHASH.cmake new file mode 100644 index 000000000..46d6fbd60 --- /dev/null +++ b/CMake/FindXXHASH.cmake @@ -0,0 +1,25 @@ +# - Try to find XXHASH +# Once done, this will define +# +# XXHASH_FOUND - system has XXHASH +# XXHASH_INCLUDE_DIRS - the XXHASH include directories +# XXHASH_LIBRARIES - the XXHASH library +find_package(PkgConfig) + +pkg_check_modules(XXHASH_PKGCONF libxxhash) + +find_path(XXHASH_INCLUDE_DIRS + NAMES xxhash.h + PATHS ${XXHASH_PKGCONF_INCLUDE_DIRS} +) + + +find_library(XXHASH_LIBRARIES + NAMES xxhash + PATHS ${XXHASH_PKGCONF_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(XXHASH DEFAULT_MSG XXHASH_INCLUDE_DIRS XXHASH_LIBRARIES) + +mark_as_advanced(XXHASH_INCLUDE_DIRS XXHASH_LIBRARIES) -- cgit v1.2.3