Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Handling, Update Stability, Improved Java SDK #402

Merged
merged 133 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
244dea6
Improve: Swift test for issue #399 (#400)
jaysenmarais Apr 29, 2024
9c16dba
Fix: Integer overflow in aligned-alloc
ashvardanian Apr 29, 2024
291c8f1
Make: Disable Windows NPM builds
ashvardanian Apr 29, 2024
1e24eb9
Fix: Going beyond level 0 in clustering
ashvardanian May 5, 2024
1b4de90
Improve: Error handling in `index_dense_gt`
ashvardanian May 5, 2024
6d4f43f
Improve: Remove `std::function` calls
ashvardanian May 5, 2024
07300a6
Improve: Remove `std::thread` from `index_dense_gt`
ashvardanian May 5, 2024
4aea1f7
Improve: `std::vector` -> `buffer_gt` in plugins
ashvardanian May 5, 2024
fa09c8b
Add: `usearch_change_threads_search`
ashvardanian May 5, 2024
bcc27c4
Fix: `index_dense_t::make(path)`
ashvardanian May 5, 2024
ffa5986
Fix: Exhastive Search
ashvardanian May 8, 2024
5ccff2f
Fix: Replacement leaves isolated nodes
ashvardanian May 8, 2024
8490f1d
Fix: Misc warnings & compilation issues
ashvardanian May 8, 2024
30a490b
Fix: Misc warnings & compilation issues
ashvardanian May 8, 2024
3e01bb3
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 8, 2024
8a2515f
Fix: Detect `ring_gt` being full
ashvardanian May 8, 2024
a2e696d
Fix: Re-init `available_threads_` after load
ashvardanian May 8, 2024
37b47b0
Fix: `uint32_t` to `uint40_t` cast (#404)
Ngalstyan4 May 8, 2024
a1cf33e
Docs: Mention `b1` in `README.md`
ashvardanian May 14, 2024
f390b16
Docs: Cover new users
ashvardanian May 14, 2024
35e7326
Improve: Updates stability & catch bug
ashvardanian May 14, 2024
c3930b4
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 14, 2024
1f93994
Fix: Dereferencing `member_iterator_t`
ashvardanian May 14, 2024
e50d698
Add: Java `get` API (#407)
mccullocht May 14, 2024
d9daeec
Fix: Compilation with `uint40_t` keys
ashvardanian May 15, 2024
1a38509
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 15, 2024
70c2669
Add: `AutoClosable` using `c_destroy` for Java (#408)
mccullocht May 15, 2024
0e1c2a5
Fix: Rare deadlock on tiny collections
ashvardanian May 15, 2024
e1eb2bf
Improve: `enable_key_lookups=false` memory usage
ashvardanian May 15, 2024
078411c
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 15, 2024
aa59418
Fix: Preset `enable_key_lookups=true` in C
ashvardanian May 15, 2024
f6f2c72
Fix: `std::is_pod` deprecated in C++20
ashvardanian May 15, 2024
dfedb5b
Fix: Unused type aliases
ashvardanian May 15, 2024
e197fab
Improve: Avoid `#pragma region` pre GCC 13 (#386)
mbautin May 15, 2024
56e5c48
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 15, 2024
218616b
Fix: Capacity checks in C# tests
ashvardanian May 15, 2024
3d5023b
Docs: Add doc-strings in C#
ashvardanian May 15, 2024
b481c6a
Make: Verbose C# logging in debug builds
ashvardanian May 16, 2024
96aa5d7
Docs: Describe serialization in GoLang
ashvardanian May 16, 2024
374306e
Make: Drop Java & JS API references
ashvardanian May 16, 2024
87439e7
Add: Load from path in Java (#410)
mccullocht May 16, 2024
b5081e6
Improve: Avoid sorting on small "refines"
ashvardanian May 18, 2024
b32aa12
Docs: Cover JIT-compiled Python examples
ashvardanian May 18, 2024
fc07ddb
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 18, 2024
8a24471
Fix: `index.copy()` trying to `memcpy(*, NULL, *)`
ashvardanian May 18, 2024
02270d9
Docs: UB in C++ Example (#415)
SheldonFung98 May 20, 2024
5745ca2
Improve: Catch UB with tests
ashvardanian May 21, 2024
fef9234
Docs: Rearrange
ashvardanian May 21, 2024
ee63e64
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian May 21, 2024
8b28bfa
Fix: Reserving contexts post-reload
ashvardanian May 23, 2024
8428b7f
Improve: Detect more failures in tests
ashvardanian May 23, 2024
c453582
Improve: Log failing lines
ashvardanian May 23, 2024
aaba478
Fix: Clamp before down-casting to `i8_t` (#422)
Ngalstyan4 May 25, 2024
fea7ce5
Fix: Concurrency bug in high-K search
ashvardanian May 26, 2024
78c677a
Make: Manually bump version to 2.13.0
ashvardanian May 26, 2024
252c505
Improve: Attempt to implement batch-metrics
ashvardanian May 27, 2024
5e6c77a
Add: Batch-capable metrics
ashvardanian May 28, 2024
68918a3
Add: `misaligned_ptr_gt` comparators
ashvardanian May 28, 2024
784f6e0
Improve: Separate `error_t` constructors
ashvardanian May 28, 2024
8d2e495
Improve: Support `enum` slots
ashvardanian May 28, 2024
2c83975
Improve: Ranges-V3 compatibility
ashvardanian May 28, 2024
fff01d2
Add: Preliminary support for batch metrics
ashvardanian May 28, 2024
38f0d71
Improve: Merge batches
ashvardanian May 28, 2024
ef3ed88
Merge remote-tracking branch 'upstream/main-dev' into main-dev-batch
ashvardanian May 28, 2024
1f82b8b
Add: Batch-parallel refinements
ashvardanian May 29, 2024
8fb6b9f
Add: `MANIFEST.in` for `py.typed` (#425)
jamesbraza May 31, 2024
9c014bc
Fix: Clear cast buffer before bitwise ORs for `b1x8_t` (#428)
Ngalstyan4 May 31, 2024
782fb3d
Fix: `esm` duplicate import bug in `jest` (#420)
eryue0220 May 31, 2024
8a628b5
Fix: build.gradle deprecations
MarkReedZ Jun 1, 2024
81c4ccb
Merge pull request #431 from MarkReedZ/fix_gradle_deprecation
ashvardanian Jun 1, 2024
3ad49e7
Fix: ESM build support (#433)
johnhorsema Jun 1, 2024
72f8ce0
Fix: `capacity()` assertion in Rust (#436)
MarkReedZ Jun 2, 2024
e678678
Fix: Computing `stats(i).max_edges`
ashvardanian Jun 7, 2024
91cc6c4
Add: Returning `computed_distances_in_refines`
ashvardanian Jun 7, 2024
032556d
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Jun 7, 2024
e90da2d
Merge branch 'main-dev' into main-dev-batch
ashvardanian Jun 7, 2024
ae95a2a
Add: Profiling attributes for `index_gt`
ashvardanian Jun 8, 2024
e248e4c
Fix: Preserve thread limits after `fork()`
ashvardanian Jun 9, 2024
740bb5f
Improve: Benchmarks self-recall support and `.bbin`
ashvardanian Jun 9, 2024
26cce33
Fix: Printing progress between exit
ashvardanian Jun 12, 2024
5def153
Docs: Fix spelling
ashvardanian Jun 20, 2024
2cc8fe5
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Jun 20, 2024
00032d0
Fix: Wolfram bindings (#437)
batracos Jun 20, 2024
527e69f
Fix: Pre-reserve enough threads for C users
ashvardanian Jun 20, 2024
df20d05
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Jun 25, 2024
0488ef8
Revert: Parallel metrics
ashvardanian Jul 7, 2024
150ac57
Fix: Updating the `entry_slot_` node
ashvardanian Jul 7, 2024
31c59c9
Improve: Enable single-threaded update tests
ashvardanian Jul 7, 2024
5ef01d5
Make: Bump version
ashvardanian Jul 7, 2024
119bc7c
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Jul 7, 2024
828f250
Fix: `flat_hash_multi_set_gt::reset` double-free
ashvardanian Jul 7, 2024
df28adb
Fix: Not enough memory in `fork()`
ashvardanian Jul 8, 2024
9e3440a
Make: Bump to SimSIMD v5
ashvardanian Jul 8, 2024
376e939
Fix: Missing SimSIMD v5 capability names
ashvardanian Jul 11, 2024
b1619bd
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Jul 15, 2024
4327e92
Improve: Detecting copy & move issues
ashvardanian Jul 15, 2024
1404b8e
Fix: Compilation w. explicit `template class`
ashvardanian Jul 31, 2024
5e83f07
Improve: Bypass UBSan NULL dereferencing warning
ashvardanian Jul 31, 2024
826f31d
Improve: Minimize alignment issues
ashvardanian Jul 31, 2024
08deec8
Make: Disable `bf16` on MacOS
ashvardanian Jul 31, 2024
8da9531
Make: Link to GitHub repo
ashvardanian Jul 31, 2024
05219c6
Fix: Conditional `call_key` compilation in MSVC
ashvardanian Jul 31, 2024
772a3fe
Fix: Unary minus on unsigned distances
ashvardanian Jul 31, 2024
38e523b
Make: Disable `bf16` in JS
ashvardanian Jul 31, 2024
da7a86c
Fix: Compatibility with pre-v2.10
zh217 Jul 31, 2024
7cf79eb
Improve: Test wrong number of dimensions in Rust (#413)
jbrummack Jul 31, 2024
6c17853
Fix: Handle wrong dimensionality in Rust
ashvardanian Jul 31, 2024
e72b3d2
Fix: Overwriting `SIMSIMD_DYNAMIC_DISPATCH`
ashvardanian Jul 31, 2024
f837f17
Make: Upgrade Java version
ashvardanian Jul 31, 2024
099007d
Fix: Spelling mistakes
ashvardanian Jul 31, 2024
855fd90
Fix: `sprintf` deprecated
ashvardanian Jul 31, 2024
5643f0a
Fix: `-Wpass-failed=transform-warning`
ashvardanian Aug 2, 2024
45edd31
Fix: Memory pinning on `Add` in C#
ashvardanian Aug 2, 2024
d67f16a
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 2, 2024
01a2228
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 2, 2024
5e01c9f
Make: Specify Java distribution
ashvardanian Aug 2, 2024
357a929
Fix: Pin memory in gets (C#)
ashvardanian Aug 3, 2024
a2879be
Make: Skip `PersistAndRestore` in CI on MacOS
ashvardanian Aug 3, 2024
33c997e
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 3, 2024
3b69f3b
Make: Upgrade Docker action
ashvardanian Aug 3, 2024
39215ef
Fix: `view_from_buffer` is unsafe in Rust
ashvardanian Aug 3, 2024
6e7fc08
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 3, 2024
61d9310
Fix: `view_from_buffer` is unsafe in Rust
ashvardanian Aug 3, 2024
b462d57
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 3, 2024
f80588d
Make: Upgrade SimSIMD
ashvardanian Aug 3, 2024
8626482
Docs: Index header has no capacity
ashvardanian Aug 3, 2024
c3c6d9b
Fix: Aggressive neighborhood checks on updates
ashvardanian Aug 3, 2024
0ab6a87
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 3, 2024
75eb773
Fix: `update()` bug detect with non-POD keys
ashvardanian Aug 3, 2024
449f5b7
Fix: Align vector type w index in C# (#456)
brittlewis12 Aug 4, 2024
24af039
Make: Versioning in pre-release CI
ashvardanian Aug 6, 2024
b0b2d85
Make: Switch from SemanticRelease to TinySemVer
ashvardanian Aug 6, 2024
3b366ba
Merge branch 'main-dev' of https://github.com/unum-cloud/usearch into…
ashvardanian Aug 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ permissions:
contents: read

jobs:
versioning:
name: Update Version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Run TinySemVer
uses: ashvardanian/tinysemver@v2.0.1
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
package.json:"version": "(\d+\.\d+\.\d+)"
CITATION.cff:^version: (\d+\.\d+\.\d+)
Cargo.toml:^version = "(\d+\.\d+\.\d+)"
wasmer.toml:^version = "(\d+\.\d+\.\d+)"
conanfile.py:version = "(\d+\.\d+\.\d+)"
java/README.md:<version>(\d+\.\d+\.\d+)</version>
README.md:version = {(\d+\.\d+\.\d+)}
csharp/nuget/nuget-package.props:>(\d+\.\d+\.\d+)</Version>
CMakeLists.txt:VERSION (\d+\.\d+\.\d+)
update-major-version-in: |
include/usearch/index.hpp:^#define USEARCH_VERSION_MAJOR (\d+)
update-minor-version-in: |
include/usearch/index.hpp:^#define USEARCH_VERSION_MINOR (\d+)
update-patch-version-in: |
include/usearch/index.hpp:^#define USEARCH_VERSION_PATCH (\d+)
dry-run: "true"

test_ubuntu_gcc:
name: Ubuntu (GCC 12)
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -75,9 +107,9 @@ jobs:

# Java
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "11"
java-version: "21"
distribution: "adopt"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
Expand All @@ -93,7 +125,7 @@ jobs:
run: |
mkdir -p "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
cp "${{ github.workspace }}/build_artifacts/libusearch_c.so" "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
dotnet test -c Release
dotnet test -c Debug --logger "console;verbosity=detailed"
shell: bash
working-directory: ${{ github.workspace }}/csharp

Expand Down Expand Up @@ -168,7 +200,7 @@ jobs:
run: |
mkdir -p "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
cp "${{ github.workspace }}/build_artifacts/libusearch_c.so" "${{ github.workspace }}/csharp/lib/runtimes/linux-x64/native"
dotnet test -c Release
dotnet test -c Debug --logger "console;verbosity=detailed"
shell: bash
working-directory: ${{ github.workspace }}/csharp

Expand Down Expand Up @@ -232,7 +264,7 @@ jobs:
run: |
mkdir -p "${{ github.workspace }}/csharp/lib/runtimes/osx-x64/native"
cp "${{ github.workspace }}/build_artifacts/libusearch_c.dylib" "${{ github.workspace }}/csharp/lib/runtimes/osx-x64/native"
dotnet test -c Release
dotnet test -c Debug --logger "console;verbosity=detailed" --filter "FullyQualifiedName!=Cloud.Unum.USearch.Tests.UsearchIndexTests.PersistAndRestore"
shell: bash
working-directory: ${{ github.workspace }}/csharp

Expand Down Expand Up @@ -288,7 +320,7 @@ jobs:
run: |
mkdir -p "${{ github.workspace }}\csharp\lib\runtimes\win-x64\native"
cp "${{ github.workspace }}\build_artifacts\libusearch_c.dll" "${{ github.workspace }}\csharp\lib\runtimes\win-x64\native"
dotnet test -c Release
dotnet test -c Debug --logger "console;verbosity=detailed"
shell: bash
working-directory: ${{ github.workspace }}/csharp

Expand All @@ -299,7 +331,7 @@ jobs:
- uses: actions/checkout@v4
- run: git submodule update --init --recursive
- name: Build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
load: true
Expand Down
48 changes: 35 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,44 @@ permissions:

jobs:
versioning:
name: Semantic Release
runs-on: ubuntu-22.04
name: Update Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up Cargo
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Bump version
run: npm install --save-dev --prefix ./package-ci @semantic-release/exec @semantic-release/git conventional-changelog-eslint semantic-release && npx --prefix ./package-ci semantic-release
- name: Run TinySemVer
uses: ashvardanian/tinysemver@v2.0.1
with:
verbose: "true"
version-file: "VERSION"
update-version-in: |
package.json:"version": "(\d+\.\d+\.\d+)"
CITATION.cff:^version: (\d+\.\d+\.\d+)
Cargo.toml:^version = "(\d+\.\d+\.\d+)"
wasmer.toml:^version = "(\d+\.\d+\.\d+)"
conanfile.py:version = "(\d+\.\d+\.\d+)"
java/README.md:<version>(\d+\.\d+\.\d+)</version>
README.md:version = {(\d+\.\d+\.\d+)}
csharp/nuget/nuget-package.props:>(\d+\.\d+\.\d+)</Version>
CMakeLists.txt:VERSION (\d+\.\d+\.\d+)
update-major-version-in: |
include/usearch/index.hpp:^#define USEARCH_VERSION_MAJOR (\d+)
update-minor-version-in: |
include/usearch/index.hpp:^#define USEARCH_VERSION_MINOR (\d+)
update-patch-version-in: |
include/usearch/index.hpp:^#define USEARCH_VERSION_PATCH (\d+)
dry-run: "false"
push: "true"
create-release: "true"
github-token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}

rebase:
name: Rebase Dev. Branch
Expand Down Expand Up @@ -469,7 +490,8 @@ jobs:
os:
- macos-latest
- ubuntu-22.04
- windows-latest
# Windows pre-buld is not working
# - windows-latest
exclude:
- arch: x86
os: macos-latest
Expand Down Expand Up @@ -614,9 +636,9 @@ jobs:
- name: Pull Git submodules
run: git submodule update --init --recursive
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "11"
java-version: "21"
distribution: "adopt"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2.4.2
Expand Down Expand Up @@ -678,7 +700,7 @@ jobs:
unum/usearch
ghcr.io/${{ github.repository }}
- name: Build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/update_version.sh

This file was deleted.

10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ bin
.cache

# C++ builds
build
build_release
build_debug
build_artifacts
/build
/build_release
/build_debug
/build_relwithdebinfo
/build_profile
/build_artifacts
_deps
CMakeCache.txt
CMakeFiles
Expand Down
13 changes: 13 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,19 @@
"datasets/wiki_1M/groundtruth.public.100K.ibin",
],
"justMyCode": true
},
{
"name": "Unit Test C#",
"type": "coreclr",
"request": "launch",
"program": "dotnet",
"args": [
"test",
"-c",
"Debug"
],
"cwd": "${workspaceFolder}/csharp",
"stopAtEntry": false
}
]
}
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
"xstring": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"xutility": "cpp"
"xutility": "cpp",
"execution": "cpp"
},
"cSpell.words": [
"allclose",
Expand All @@ -139,6 +140,7 @@
"dtype",
"DUSEARCH",
"emcmake",
"endregion",
"equi",
"equidimensional",
"FAISS",
Expand All @@ -151,6 +153,11 @@
"hnswlib",
"ibin",
"jaccard",
"Jemalloc",
"Kullback",
"Leibler",
"libjemalloc",
"libomp",
"libusearch",
"linalg",
"longlong",
Expand All @@ -174,10 +181,13 @@
"SLOC",
"Sonatype",
"sorensen",
"Sørensen",
"sqeuclidean",
"stringzilla",
"Struct",
"swar",
"tanimoto",
"tparam",
"tqdm",
"uninitialize",
"unumusearch",
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"tasks": [
{
"label": "Linux Build Debug",
"command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && cmake --build ./build_debug --config Debug",
"command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_USE_OPENMP=0 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1 -DCMAKE_BUILD_TYPE=Debug -B ./build_debug && cmake --build ./build_debug --config Debug",
"args": [],
"type": "shell",
"problemMatcher": [
Expand All @@ -12,7 +12,7 @@
},
{
"label": "Linux Build Release",
"command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1 -DCMAKE_BUILD_TYPE=Release -B ./build_release && cmake --build ./build_release --config RelWithDebInfo",
"command": "cmake -DCMAKE_CXX_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_BUILD_LIB_C=1 -DUSEARCH_USE_OPENMP=0 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1 -DCMAKE_BUILD_TYPE=Release -B ./build_release && cmake --build ./build_release --config RelWithDebInfo",
"args": [],
"type": "shell",
"problemMatcher": [
Expand Down
28 changes: 14 additions & 14 deletions BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,19 @@ Within this repository you will find two commonly used utilities:
To achieve best highest results we suggest compiling locally for the target architecture.

```sh
cmake -B ./build_release -USEARCH_BUILD_BENCH_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1
cmake --build ./build_release --config Release -j
./build_release/bench_cpp --help
cmake -USEARCH_BUILD_BENCH_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -B build_profile
cmake --build build_profile --config RelWithDebInfo -j
build_profile/bench_cpp --help
```

Which would print the following instructions.

```txt
SYNOPSIS
./build_release/bench_cpp [--vectors <path>] [--queries <path>] [--neighbors <path>] [-b] [-j
<integer>] [-c <integer>] [--expansion-add <integer>]
[--expansion-search <integer>] [--native|--f16quant|--i8quant]
[--ip|--l2sq|--cos|--haversine] [-h]
build_profile/bench_cpp [--vectors <path>] [--queries <path>] [--neighbors <path>] [-b] [-j
<integer>] [-c <integer>] [--expansion-add <integer>]
[--expansion-search <integer>] [--native|--f16quant|--i8quant]
[--ip|--l2sq|--cos|--haversine] [-h]

OPTIONS
--vectors <path>
Expand Down Expand Up @@ -111,12 +111,12 @@ OPTIONS
Here is an example of running the C++ benchmark:

```sh
./build_release/bench_cpp \
build_profile/bench_cpp \
--vectors datasets/wiki_1M/base.1M.fbin \
--queries datasets/wiki_1M/query.public.100K.fbin \
--neighbors datasets/wiki_1M/groundtruth.public.100K.ibin

./build_release/bench_cpp \
build_profile/bench_cpp \
--vectors datasets/t2i_1B/base.1B.fbin \
--queries datasets/t2i_1B/query.public.100K.fbin \
--neighbors datasets/t2i_1B/groundtruth.public.100K.ibin \
Expand Down Expand Up @@ -201,17 +201,17 @@ With `perf`:

```sh
# Pass environment variables with `-E`, and `-d` for details
sudo -E perf stat -d ./build_release/bench_cpp ...
sudo -E perf mem -d ./build_release/bench_cpp ...
sudo -E perf stat -d build_profile/bench_cpp ...
sudo -E perf mem -d build_profile/bench_cpp ...
# Sample on-CPU functions for the specified command, at 1 Kilo Hertz:
sudo -E perf record -F 1000 ./build_release/bench_cpp ...
perf record -d -e arm_spe// -- ./build_release/bench_cpp ..
sudo -E perf record -F 1000 build_profile/bench_cpp ...
perf record -d -e arm_spe// -- build_profile/bench_cpp ..
```

### Caches

```sh
sudo perf stat -e 'faults,dTLB-loads,dTLB-load-misses,cache-misses,cache-references' ./build_release/bench_cpp ...
sudo perf stat -e 'faults,dTLB-loads,dTLB-load-misses,cache-misses,cache-references' build_profile/bench_cpp ...
```

Typical output on a 1M vectors dataset is:
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
given-names: "Ash"
orcid: "https://orcid.org/0000-0002-4882-1815"
title: "USearch by Unum Cloud"
version: 2.12.0
version: 2.13.0
doi: 10.5281/zenodo.7949416
date-released: 2023-10-22
url: "https://github.com/unum-cloud/usearch"
Loading
Loading