testing hash

This commit is contained in:
2026-07-02 15:19:31 +03:00
parent ab619909d9
commit 4a1e0bb078
33 changed files with 2356 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
mkdir -p build
cat > build/config.h <<'EOF'
#define HAVE_STDINT_H 1
#define HAVE_STRING_H 1
#define HAVE_STDLIB_H 1
EOF
cc -O3 -std=c99 -Wall -Wextra -Werror -I. \
-c src/joaat/hash.c -o build/joaat.o
cc -O3 -std=c99 -Wall -Wextra -Werror -I. \
-c src/xxHash/xxhash.c -o build/xxhash.o
g++ -O3 -std=c++17 -Wall -Wextra -Werror \
-I. -Ibuild -Isrc/cityhash/src \
collizions.cpp src/cityhash/src/city.cc build/joaat.o build/xxhash.o \
-o build/collizions_test
# Args are passed through to collizions_test:
# ./build_collizions.sh [runs=5] [samples=50000]
./build/collizions_test "$@"