Skip to content

Commit 905ab96

Browse files
committed
Improve benchmark docs
1 parent a59ac0b commit 905ab96

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Developers might want to consider our [Header-only Xor Filter library in C](http
99
## Prerequisites
1010

1111
- A C++11 compiler such as GNU G++ or LLVM Clang++
12-
- Make
12+
- Make
1313

1414
Expectations:
1515

@@ -19,7 +19,7 @@ Expectations:
1919
## Usage
2020

2121
Make sure to select the right GNU GCC compiler (e.g., via `export export CXX=g++-8`).
22-
You may want to disable hyperthreading and adjust page sizes. Run the benchmark
22+
You may want to disable hyperthreading and adjust page sizes. Run the benchmark
2323
on a quiet machine.
2424

2525

@@ -48,7 +48,7 @@ add cycles: 325.5/key, instructions: (303.2/key, 0.93/cycle) cache misses: 12
4848
0.75% cycles: 82.0/key, instructions: ( 48.0/key, 0.59/cycle) cache misses: 3.06/key branch misses: 0.00/key
4949
1.00% cycles: 81.9/key, instructions: ( 48.0/key, 0.59/cycle) cache misses: 3.06/key branch misses: 0.00/key
5050
Xor8 106.79 0.00 25.92 25.88 25.86 25.94 25.98 0.3892% 9.84 8.01 22.9% 10.0
51-
51+
5252
... # many more lines omitted
5353
```
5454

@@ -60,19 +60,28 @@ As part of the benchmark, we check the correctness of the implementation.
6060

6161
## Benchmarking
6262

63-
The shell script `benchmark/benchmark.sh` runs the benchmark 3 times for the most important algorithms, with entry sizes of 10 million and 100 million keys. It is much slower than the above, because each invocation runs only one algorithm (to ensure running one algorithm doesn't influence benchmark results of other algorithms). It stores the results in the file `benchmark-results.txt`. To futher analyze the results, use the java tool `AnalyzeResults.java` from the project https://github.com/FastFilter/fastfilter_java. Complete steps to run the tests and analyze the results:
63+
The shell script `benchmark/benchmark.sh` runs the benchmark 3 times for the most important algorithms,
64+
with entry sizes of 10 million and 100 million keys.
65+
It is much slower than the above, because each invocation runs only one algorithm
66+
(to ensure running one algorithm doesn't influence benchmark results of other algorithms).
67+
It stores the results in the file `benchmark-results.txt`.
68+
To futher analyze the results, use the java tool `AnalyzeResults.java`
69+
from the project https://github.com/FastFilter/fastfilter_java.
70+
Requires GCC and Java 8.
71+
To get a low error, it is best run on a Linux machine that is not otherwise in use.
72+
Steps to run the tests and analyze the results:
6473

6574
git clone https://github.com/FastFilter/fastfilter_cpp.git
6675
git clone https://github.com/FastFilter/fastfilter_java.git
6776
cd fastfilter_cpp/benchmarks
6877
make clean ; make
69-
# this may take a few hours to run
78+
# this may take an hour to run
7079
./benchmark.sh
71-
80+
7281
cd ../..
7382
cd fastfilter_java
7483
mvn clean install
75-
java -cp target/test-classes org.fastfilter.analysis.AnalyzeResults ../fastfilter_cpp/benchmarks/benchmark-results.txt
84+
java -cp target/test-classes org.fastfilter.analysis.AnalyzeResults ../fastfilter_cpp/benchmarks/benchmark-results.txt
7685

7786

7887
## Where is your code?

benchmarks/benchmark.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#!/bin/sh
2+
# run the benchmark multiple times with all important algorithms
3+
# for algorithm ids and other parameters, see
4+
# bulk-insert-and-query.cc
5+
#
6+
# rnd: random number generators to use
27
for rnd in `seq -1 -1`; do
3-
for alg in 0 1 2 3 4 10 11 12 13 20 40 41 42 43 44 45 46 47 48 50 51 52 60 61 62 100; do
8+
# alg: algorithms to test
9+
for alg in 0 2 3 4 11 12 13 20 40 41 42 51 100; do
10+
# m: number of entries
411
for m in `seq 10 90 100`; do
12+
# test: test id
513
for test in `seq 1 3`; do
614
now=$(date +"%T");
715
echo ${now} alg ${alg} size ${m} ${rnd};

0 commit comments

Comments
 (0)