Skip to content

Commit 96baa09

Browse files
committed
Docs: Update benchmarking sections
1 parent b1a1439 commit 96baa09

File tree

2 files changed

+22
-36
lines changed

2 files changed

+22
-36
lines changed

docs/benchmarks.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Also worth noting, 8-bit quantization results in almost no quantization loss and
5656
Within this repository you will find two commonly used utilities:
5757

5858
- `cpp/bench.cpp` the produces the `bench` binary for broad USearch benchmarks.
59-
- `python/bench.py` for simple benchmarks against FAISS.
59+
- `python/bench.py` and `python/bench.ipynb` for interactive charts against FAISS.
6060

6161
To achieve best highest results we suggest compiling locally for the target architecture.
6262

@@ -112,6 +112,27 @@ OPTIONS
112112
-h, --help Print this help information on this tool and exit
113113
```
114114

115+
Here is an example of running the C++ benchmark:
116+
117+
```sh
118+
./build_release/bench \
119+
--vectors datasets/wiki_1M/base.1M.fbin \
120+
--queries datasets/wiki_1M/query.public.100K.fbin \
121+
--neighbors datasets/wiki_1M/groundtruth.public.100K.ibin
122+
123+
./build_release/bench \
124+
--vectors datasets/t2i_1B/base.1B.fbin \
125+
--queries datasets/t2i_1B/query.public.100K.fbin \
126+
--neighbors datasets/t2i_1B/groundtruth.public.100K.ibin \
127+
--output datasets/t2i_1B/index.usearch \
128+
--cos
129+
```
130+
131+
132+
> Optional parameters include `connectivity`, `expansion_add`, `expansion_search`.
133+
134+
For Python, jut open the Jupyter Notebook and start playing around.
135+
115136
## Datasets
116137

117138
BigANN benchmark is a good starting point, if you are searching for large collections of high-dimensional vectors.

docs/compilation.md

-35
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,6 @@ Testing:
5656
cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && make -C ./build_debug && ./build_debug/test
5757
```
5858

59-
Benchmarking:
60-
61-
```sh
62-
./build_release/bench \
63-
--vectors datasets/wiki_1M/base.1M.fbin \
64-
--queries datasets/wiki_1M/query.public.100K.fbin \
65-
--neighbors datasets/wiki_1M/groundtruth.public.100K.ibin
66-
67-
./build_release/bench \
68-
--vectors datasets/t2i_1B/base.1B.fbin \
69-
--queries datasets/t2i_1B/query.public.100K.fbin \
70-
--neighbors datasets/t2i_1B/groundtruth.public.100K.ibin \
71-
--output datasets/t2i_1B/index.usearch \
72-
--cos
73-
```
74-
7559
## Python 3
7660

7761
Use PyTest to validate the build.
@@ -96,25 +80,6 @@ pip install cibuildwheel
9680
cibuildwheel --platform linux
9781
```
9882

99-
Benchmarking:
100-
101-
```sh
102-
pip install faiss-cpu
103-
python python/scripts/bench.py speed \
104-
--vectors datasets/wiki_1M/base.1M.fbin \
105-
--queries datasets/wiki_1M/query.public.100K.fbin \
106-
--neighbors datasets/wiki_1M/groundtruth.public.100K.ibin
107-
```
108-
109-
> Optional parameters include `connectivity`, `expansion_add`, `expansion_search`.
110-
111-
Checking the effect of different embedding dimensions on construction speed:
112-
113-
```sh
114-
python python/scripts/bench.py dimensions ...
115-
python python/scripts/bench.py connectivity ...
116-
```
117-
11883
## JavaScript
11984

12085
Node.JS:

0 commit comments

Comments
 (0)