├── fuzz ├── .gitignore ├── fuzz_targets │ ├── fuzz_target_1.rs │ ├── input_validation.rs │ └── distances.rs └── Cargo.toml ├── rust_annie_macros └── foo │ ├── src │ └── main.rs │ └── Cargo.toml ├── src ├── example_index.bin ├── prelude.rs ├── backend.rs ├── gpu │ ├── precision.rs │ ├── device.rs │ └── gpu.rs ├── kernels │ ├── l2_kernel.cu │ └── l2_kernel.hip ├── backends │ └── ann_backend.rs ├── main.rs ├── test.py └── build.rs ├── benchmarks ├── 2025-06-17T051824Z_48acc1b.json ├── d803e4ed7095fbaf3e975369736f4d714f24ff76-medium.json ├── c21cbd3692fe65cdda43bf891a303df011373ff7-medium.json ├── 5c3ab2f4907644233d0a373de6ddc1bc753cca35-medium.json ├── d4b95c1036bcd398d6f7436055352a74a4dd41ed-medium.json ├── 07514ec63bcce152303930e1e6ee27730c3c11c5-medium.json ├── 1df9a54ced2a883521ebd12379b1ecb9dd1df83d-medium.json ├── 597fbb8b28fb4d09024ab9c2e128460c3cb0ba0a-medium.json ├── 6626ac2a3c3b13737911d8ffd6ec124df4161b4d-medium.json ├── 7e281dde029f9202ef98bc07bc0d4a9cd91f0ff5-medium.json ├── 8113504ebc56a17f939d473d65d79fbafef9ca16-medium.json ├── 91e647c899e9c25b27625ed8eb20761d74f2e4d2-medium.json ├── 989de3b047b2880f4f33ba47717df855b883852c-medium.json ├── dd72c07f97aefa61cc58538a202dc532e402016b-medium.json ├── ecf2f36e87daa1810344a92c6a626ca306f1d37d-medium.json ├── 2e1def1d0abcb390018675276e35194f3d4a427f-medium.json ├── 4b31e23d003b9be8d9d4c71467061384a0e30713-medium.json ├── dfee4f913f4f0dede987b1e5034c0af998055289-medium.json ├── e7faba3db786483189dab0b42fc98ab772369653-medium.json ├── f4ff7246be7bdcff575367fec041cc8472a17a75-medium.json ├── 6e531d66443427ed8ddecdcac56106bd3ca096fc-medium.json ├── 72b98c2e07b39f104aa023668aae6e661dab0204-medium.json ├── 86e246fcab13971ced3edee7cbf63656ddf57981-medium.json ├── e98a8cde17129adeeb7cb657482bbab5a02a6d50-medium.json ├── 0f5bdbfa52d258785bdb27e3752ef53ac2807421-medium.json ├── 20d4993e7c4b074bfb5ef83c52dee51c7cdd91f1-medium.json ├── 47f824975f2d14b7d78c81aa87468fdb6783aed6-medium.json ├── 7cec1e63b23bc09f416b090d2ae1abf468722a56-medium.json ├── a7152227cba2c228c81447725e1dab87e6725a3e-medium.json ├── aa406866a95565d39f3632654a659c07465c6cc9-medium.json ├── d8b47db1e7ba2c4c1ef7afcd9a28bdc2c1e01de8-medium.json ├── e995873161b595158a50fe8bc5d14e5f1f870a46-medium.json ├── 0a5d73ad49100c494d767f3f6eba5a5ab993aacd-medium.json ├── 2e3d314ec7ef1b6d13463e81247155772e225823-medium.json ├── 4debfc8f2ffb3d43f193f38615f846aa4373edbc-medium.json ├── 55a1ddf0279df0856464a065aa1d5706eb9f3153-medium.json ├── 6461fa5c425e46424ee1163fbfbec8d77f23e607-medium.json ├── 8694df386805a778b7bd503460cdd62b4a13e396-medium.json ├── b297b44fb277d5755bf5eea00d551ed723034e55-medium.json ├── d56c3b90dc65591c4c42113db0c247496c19ba2f-medium.json ├── f13e48f8498232cd8c4ec140df83b5d1fd9d1bac-medium.json ├── 271744132a87dd051cb5137c92b6e3c369504ea0-medium.json ├── 278e428b750fddfc5372371ff16cefedd0ba3c3b-medium.json ├── 3a193f216c60d36c31ec54337cb157dc34310975-medium.json ├── 0e4345eb437eb398848ca60b3c2f1d3f7457a992-medium.json ├── 613619157db5e7acaa61f9f4327d089e4f24775d-medium.json ├── 086a756c2e594cd823c2b98164c1bcf2287f8a29-medium.json ├── 45813c5d262c192e2583c95564cd352b3e2aec7d-small.json ├── 4830f9850ba7983b3a0292efd5e96fa141e72fe4-small.json ├── 76e6fd760d7889721a100dca40356d562bb82a41-small.json ├── 96d5729cf795e8960b8160e51fa3a000cf0197e4-small.json ├── a2b3bb270e5d98e95211b0a94690ca31645ed6c1-small.json ├── 12439ddfa265bf94d1490f43ce55bafb497a21a2-small.json ├── 792f2c23fd2d9f10f8f068efbb33c156454ca101-small.json ├── 8b3fb93826affa61e313892cf360c116e8f370c6-small.json ├── a8aa35b082d240204e0923b2fa64b437c4803c3c-small.json ├── e282f525b14ee4f5dc1df79d032e6ff381d17e5b-small.json ├── f37b1b6361ed5f3d9eda6e73f8d6793010fc66a8-small.json ├── 01139935ae021c193a735905483aa1683648b867-small.json ├── 077abf075c12368405e4211cd01bda8d9bff5da2-small.json ├── 0c6fe5d2f9c0c553ce16f69796368e1aaf3e324c-small.json ├── 1dfe992628d2277127e7c3ad6f0d3eca30693909-small.json ├── 2682440c2812a110e7849d15499b0c394debd835-small.json ├── 4a6d0f4565cce428bb4b16b40e1b3a22590c2f19-small.json ├── 5712e55bb312abab9fcac63155e6a832bef1272a-small.json ├── 61fcbef0f0d64e6f3311b446aba766e2df02cfc9-small.json ├── 671da3bc90656fb6a2307e2b08368d386c960612-small.json ├── 6c86cf1830a8a5978fada8589a571ffdfbe7c908-small.json ├── 7fa07ab5003a42db8bb40329bd5cea9f96f5451c-small.json ├── 9b87bc63eef19246c911982e8048866103feace2-small.json ├── a4dc1fd86256144815d09120e61727a68fd2e641-small.json ├── b358b7f69fcfcedb3dca396bd062f497d8a4e081-small.json ├── c3551284e083fb6f8e3177c1b0b0693d9c91a0a5-small.json ├── c523cb5d8a5a5bce52e31e6a7ee304356d9ad195-small.json ├── d025182b9c94d96ff57ca9bd871cd865e0d003a3-small.json ├── e3ddada7f6de3087ed0582f499e4e6372a42e057-small.json ├── f2e68e7713999d88a8f6f763978e3c1450907ffc-small.json ├── 04f2c189b22bbc18d2f6d70749cf478f61a6bd46-small.json ├── 0654aa4fbc3d71a41c9e8b1f642c6308d4cc4bad-small.json ├── 0a06d8321c9a7f31d996ce4a9683b3f8107c7c45-small.json ├── 1d3f44d0741942be5926353cfdd5726f990eb4ac-small.json ├── 1f092eba61af6517ab45781a8589a864af593efa-small.json ├── 1f2a0840aefd9ffb69999a934d5ae4340417e71a-small.json ├── 2bc79d81061bb11407514570fe7065cc9ceb7caf-small.json ├── 2d2b68b70badcfc6be9b10ebfcc565b2c3ec5f46-small.json ├── 484858a9b37347b69e2e284aaf66567a10b3ab79-small.json ├── 5453da0f79a7c02106cabc5c643b026b2b0bc7bf-small.json ├── 5a3d7a1d3565af881f8a20d0361c6df22258c1d8-small.json ├── 64ae62be1cdd31834d128a01815461316dcbdb6d-small.json ├── 670abaf2c1de80a78b216fe17facf57e4f3709a7-small.json └── 7c145061cb614715e223e0f1d4f7a34e9f119bd3-small.json ├── scripts ├── Dockerfile ├── filter_example.py ├── compare.py └── batch_ben.py ├── tests ├── test_bindings.py ├── gpu_test.rs ├── test_ann_index.py ├── metrics.rs ├── test_hnsw.py ├── test_threadsafeindex.rs ├── test_py_index.py ├── concurrency_stress.rs └── gpu_error_conditions.rs ├── .github ├── dependabot.yml └── workflows │ ├── rocm.yml │ ├── fuzz.yml │ ├── security-audit.yml │ └── update-changelog.yml ├── pyproject.toml ├── docs └── dashboard-badge.svg ├── .gitignore ├── LICENSE ├── benches ├── ann_bench.rs └── gpu_benchmark.rs └── Cargo.toml /fuzz/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | corpus 3 | artifacts 4 | coverage 5 | -------------------------------------------------------------------------------- /rust_annie_macros/foo/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello, world!"); 3 | } 4 | -------------------------------------------------------------------------------- /src/example_index.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Programmers-Paradise/Annie/HEAD/src/example_index.bin -------------------------------------------------------------------------------- /benchmarks/2025-06-17T051824Z_48acc1b.json: -------------------------------------------------------------------------------- 1 | { 2 | "N": 10000, 3 | "D": 64, 4 | "k": 10, 5 | "repeats": 10, 6 | "rust_avg_ms": 4.5644, 7 | "python_avg_ms": 0.68, 8 | "speedup": 0.149, 9 | "timestamp": 1750137504.755628 10 | } -------------------------------------------------------------------------------- /rust_annie_macros/foo/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_annie_macros" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [lib] 7 | proc-macro = true 8 | 9 | [dependencies] 10 | syn = { version = "2.0", features = ["full", "extra-traits"] } 11 | quote = "1.0" 12 | proc-macro2 = "1.0" -------------------------------------------------------------------------------- /fuzz/fuzz_targets/fuzz_target_1.rs: -------------------------------------------------------------------------------- 1 | #![no_main] 2 | 3 | use libfuzzer_sys::fuzz_target; 4 | 5 | fuzz_target!(|data: &[u8]| { 6 | // fuzzed code: try to parse as UTF-8 7 | if let Ok(_s) = std::str::from_utf8(data) { 8 | // Use s if needed for further fuzzing logic 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /src/prelude.rs: -------------------------------------------------------------------------------- 1 | // src/prelude.rs 2 | 3 | //! A “prelude” to import the most common types and traits in one go. 4 | 5 | pub use crate::index::AnnIndex; 6 | pub use crate::metrics::Distance; 7 | pub use crate::storage::{save_index, load_index}; 8 | pub use crate::concurrency::ThreadSafeIndex; 9 | pub use crate::errors::RustAnnError; 10 | -------------------------------------------------------------------------------- /scripts/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile.rocm 2 | FROM rocm/dev-ubuntu-20.04:latest 3 | 4 | # Install dependencies 5 | RUN apt-get update && apt-get install -y \ 6 | build-essential \ 7 | pkg-config \ 8 | libclang-dev \ 9 | curl 10 | 11 | # Install Rust 12 | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 13 | 14 | WORKDIR /app 15 | COPY . . 16 | 17 | # Build with ROCm support 18 | RUN cargo build --features rocm 19 | -------------------------------------------------------------------------------- /tests/test_bindings.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from rust_annie import AnnIndex, Distance 3 | 4 | 5 | def test_add_and_search(): 6 | data = np.random.rand(100, 16).astype(np.float32) 7 | ids = np.arange(100, dtype=np.int64) 8 | 9 | idx = AnnIndex(16, Distance.EUCLIDEAN) 10 | idx.add(data, ids) 11 | 12 | query = data[0] 13 | results = idx.search(query, 5) 14 | assert len(results[0]) == 5 15 | assert isinstance(results[0][0], np.integer) 16 | -------------------------------------------------------------------------------- /tests/gpu_test.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "cuda")] 2 | #[test] 3 | fn test_l2_gpu() { 4 | use annie::gpu::gpu::l2_distance_gpu; 5 | 6 | let dim = 3; 7 | let n_queries = 1; 8 | let n_vectors = 1; 9 | let queries = vec![1.0, 2.0, 3.0]; 10 | let corpus = vec![1.0, 0.0, 0.0]; 11 | 12 | let out = l2_distance_gpu(&queries, &corpus, dim, n_queries, n_vectors) 13 | .expect("Failed to compute L2 distance on GPU"); 14 | assert!((out[0] - 13.0).abs() < 1e-3); // (2² + 3²) = 13 15 | } 16 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | version: 2 6 | updates: 7 | - package-ecosystem: "cargo" 8 | directory: "/" # location of your Cargo.toml 9 | schedule: 10 | interval: "weekly" 11 | -------------------------------------------------------------------------------- /src/backend.rs: -------------------------------------------------------------------------------- 1 | //new added 2 | // use crate::distance::Distance; 3 | use crate::metrics::Distance; 4 | 5 | 6 | 7 | pub trait AnnBackend { 8 | fn new(dims: usize, distance: Distance) -> Self 9 | where 10 | Self: Sized; 11 | 12 | fn add_item(&mut self, item: Vec); 13 | fn build(&mut self); 14 | fn search(&self, vector: &[f32], k: usize) -> Vec; 15 | 16 | fn save(&self, path: &str); 17 | 18 | #[allow(dead_code)] 19 | fn load(path: &str) -> Self 20 | where 21 | Self: Sized; 22 | } 23 | -------------------------------------------------------------------------------- /tests/test_ann_index.py: -------------------------------------------------------------------------------- 1 | from rust_annie import AnnIndex, Distance 2 | import numpy as np 3 | 4 | 5 | def test_len_and_dim(): 6 | dim = 3 7 | index = AnnIndex(dim, Distance.EUCLIDEAN) 8 | 9 | # Should be empty at the start 10 | assert index.len() == 0 11 | assert index.dim() == dim 12 | 13 | # Add a vector and test again 14 | vectors = np.array([[1.0, 2.0, 3.0]], dtype=np.float32) 15 | ids = np.array([42], dtype=np.int64) 16 | index.add(vectors, ids) 17 | 18 | assert index.len() == 1 19 | assert index.dim() == dim 20 | -------------------------------------------------------------------------------- /src/gpu/precision.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 2 | pub enum Precision { 3 | Fp32, 4 | Fp16, 5 | Int8, 6 | } 7 | 8 | impl Precision { 9 | pub fn element_size(&self) -> usize { 10 | match self { 11 | Precision::Fp32 => 4, 12 | Precision::Fp16 => 2, 13 | Precision::Int8 => 1, 14 | } 15 | } 16 | 17 | pub fn kernel_suffix(&self) -> &'static str { 18 | match self { 19 | Precision::Fp32 => "fp32", 20 | Precision::Fp16 => "fp16", 21 | Precision::Int8 => "int8", 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["maturin>=1.8,<2.0"] 3 | build-backend = "maturin" 4 | 5 | [project] 6 | name = "rust_annie" 7 | requires-python = ">=3.8" 8 | classifiers = [ 9 | "Programming Language :: Rust", 10 | "Programming Language :: Python :: Implementation :: CPython", 11 | "Programming Language :: Python :: Implementation :: PyPy", 12 | ] 13 | dynamic = ["version"] 14 | [tool.maturin] 15 | # Build as an extension module using the stable Python limited API (abi3), 16 | # so wheels don’t link against a specific libpython (required for musllinux). 17 | features = ["python-ext", "python-abi3", "pyo3-import-lib"] 18 | -------------------------------------------------------------------------------- /src/kernels/l2_kernel.cu: -------------------------------------------------------------------------------- 1 | extern "C" __global__ void l2_distance_kernel( 2 | const float* __restrict__ queries, 3 | const float* __restrict__ corpus, 4 | float* __restrict__ out, 5 | int n_queries, 6 | int n_vectors, 7 | int dim 8 | ) { 9 | int q_idx = blockIdx.x; 10 | int v_idx = threadIdx.x; 11 | 12 | if (q_idx < n_queries && v_idx < n_vectors) { 13 | float sum = 0.0f; 14 | for (int d = 0; d < dim; ++d) { 15 | float diff = queries[q_idx * dim + d] - corpus[v_idx * dim + d]; 16 | sum += diff * diff; 17 | } 18 | out[q_idx * n_vectors + v_idx] = sum; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/backends/ann_backend.rs: -------------------------------------------------------------------------------- 1 | /// Trait that defines a common interface for ANN backends. 2 | /// Both BruteForceIndex and HnswIndex will implement this. 3 | pub trait AnnBackend { 4 | /// Add a single vector to the index. 5 | fn add(&mut self, vector: Vec); 6 | fn remove(&mut self, id: usize); 7 | fn update(&mut self, id: usize, vector: Vec); 8 | fn compact(&mut self); 9 | /// Search for k nearest neighbors. 10 | /// Returns Vec of (index, distance). 11 | fn search(&self, query: &[f32], k: usize) -> Vec<(usize, f32)>; 12 | 13 | /// Number of items stored. 14 | fn len(&self) -> usize; 15 | fn version(&self) -> u64; 16 | } 17 | -------------------------------------------------------------------------------- /fuzz/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_annie-fuzz" 3 | version = "0.0.0" 4 | publish = false 5 | edition = "2021" 6 | 7 | # Note: toolchain specification moved to rust-toolchain.toml file 8 | # [toolchain] 9 | # channel = "nightly" 10 | # components = ["rust-src"] 11 | 12 | [package.metadata] 13 | cargo-fuzz = true 14 | 15 | [dependencies] 16 | libfuzzer-sys = "0.4" 17 | [dependencies.rust_annie] 18 | path = ".." 19 | 20 | [[bin]] 21 | name = "fuzz_target_1" 22 | path = "fuzz_targets/fuzz_target_1.rs" 23 | test = false 24 | doc = false 25 | bench = false 26 | 27 | [[bin]] 28 | name = "distances" 29 | path = "fuzz_targets/distances.rs" 30 | test = false 31 | doc = false 32 | bench = false 33 | -------------------------------------------------------------------------------- /src/kernels/l2_kernel.hip: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" __global__ void l2_distance_kernel( 4 | const float* __restrict__ queries, 5 | const float* __restrict__ corpus, 6 | float* __restrict__ out, 7 | int n_queries, 8 | int n_vectors, 9 | int dim 10 | ) { 11 | int q_idx = blockIdx.x; 12 | int v_idx = threadIdx.x; 13 | 14 | if (q_idx < n_queries && v_idx < n_vectors) { 15 | float sum = 0.0f; 16 | for (int d = 0; d < dim; ++d) { 17 | float diff = queries[q_idx * dim + d] - corpus[v_idx * dim + d]; 18 | sum += diff * diff; 19 | } 20 | out[q_idx * n_vectors + v_idx] = sum; 21 | } 22 | } -------------------------------------------------------------------------------- /.github/workflows/rocm.yml: -------------------------------------------------------------------------------- 1 | rocm: 2 | name: ROCm Backend Tests 3 | runs-on: ubuntu-latest 4 | container: 5 | image: rocm/dev-ubuntu-20.04:latest 6 | options: --device=/dev/kfd --device=/dev/dri --group-add video 7 | steps: 8 | - uses: actions/checkout@v4 9 | 10 | - name: Install Dependencies 11 | run: | 12 | apt-get update 13 | apt-get install -y build-essential pkg-config libclang-dev 14 | 15 | - name: Set up Rust 16 | uses: actions-rs/toolchain@v1 17 | with: 18 | toolchain: stable 19 | override: true 20 | 21 | - name: Build with ROCm support 22 | run: cargo build --features rocm 23 | 24 | - name: Run tests with ROCm 25 | run: cargo test --features rocm 26 | -------------------------------------------------------------------------------- /docs/dashboard-badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Performance 12 | Performance 13 | 4.2x 14 | 4.2x 15 | 16 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #[cfg(any(feature = "cuda", feature = "rocm"))] 2 | use annie::gpu::gpu::l2_distance_gpu; 3 | 4 | fn main() { 5 | #[cfg(any(feature = "cuda", feature = "rocm"))] 6 | { 7 | let dim = 3; 8 | let n_queries = 2; 9 | let n_vectors = 2; 10 | let queries = vec![ 11 | 1.0, 2.0, 3.0, // Query 1 12 | 4.0, 5.0, 6.0, // Query 2 13 | ]; 14 | let corpus = vec![ 15 | 1.0, 0.0, 0.0, // Vector 1 16 | 0.0, 1.0, 0.0, // Vector 2 17 | ]; 18 | 19 | let distances = l2_distance_gpu(&queries, &corpus, dim, n_queries, n_vectors); 20 | println!("GPU L2 distances: {:?}", distances); 21 | } 22 | 23 | #[cfg(not(any(feature = "cuda", feature = "rocm")))] 24 | println!("Run with --features cuda or --features rocm to enable GPU support."); 25 | } 26 | -------------------------------------------------------------------------------- /src/test.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from rust_annie import AnnIndex, Distance 3 | 4 | 5 | def main(): 6 | dim = 4 7 | 8 | # Initialize the index 9 | idx = AnnIndex(dim, Distance.COSINE) 10 | 11 | # Create some data 12 | data = np.random.rand(10, dim).astype(np.float32) 13 | ids = np.arange(10, dtype=np.int64) 14 | 15 | # Add data to the index 16 | idx.add(data, ids) 17 | 18 | # Query the first vector 19 | q = data[0] 20 | neigh_ids, distances = idx.search(q, k=3) 21 | print("Query:", q) 22 | print("Neighbors:", neigh_ids) 23 | print("Distances:", distances) 24 | 25 | # Save & reload 26 | idx.save("example_index.bin") 27 | idx2 = AnnIndex.load("example_index.bin") 28 | neigh2, _ = idx2.search(q, k=3) 29 | print("Reloaded neighbors:", neigh2) 30 | 31 | 32 | if __name__ == "__main__": 33 | main() 34 | -------------------------------------------------------------------------------- /.github/workflows/fuzz.yml: -------------------------------------------------------------------------------- 1 | name: Fuzz Testing 2 | 3 | on: [push, pull_request] 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | fuzz: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout repository 13 | uses: actions/checkout@v3 14 | 15 | - name: Install Rust nightly 16 | uses: actions-rs/toolchain@v1 17 | with: 18 | toolchain: nightly 19 | components: rust-src 20 | override: true 21 | 22 | - name: Install cargo-fuzz 23 | run: cargo install cargo-fuzz --locked 24 | 25 | - name: Build fuzz target 26 | working-directory: fuzz 27 | run: cargo fuzz build distances 28 | 29 | - name: Run fuzz tests for 60 seconds 30 | working-directory: fuzz 31 | run: cargo fuzz run distances -- -max_total_time=60 32 | env: 33 | RUSTFLAGS: -C debug-assertions=no 34 | RUST_BACKTRACE: full 35 | -------------------------------------------------------------------------------- /tests/metrics.rs: -------------------------------------------------------------------------------- 1 | use rust_annie::metrics::{euclidean, cosine, manhattan, chebyshev}; 2 | 3 | fn approx_eq(a: f32, b: f32, tol: f32) -> bool { 4 | (a - b).abs() < tol 5 | } 6 | 7 | #[test] 8 | fn test_euclidean() { 9 | let a = &[1.0, 2.0, 3.0]; 10 | let b = &[4.0, 5.0, 6.0]; 11 | let dist = euclidean(a, b); 12 | assert!(approx_eq(dist, 5.196152, 1e-5)); 13 | } 14 | 15 | #[test] 16 | fn test_cosine() { 17 | let a = &[1.0, 0.0]; 18 | let b = &[0.0, 1.0]; 19 | let dist = cosine(a, b); 20 | assert!(approx_eq(dist, 1.0, 1e-5)); // cosine distance of orthogonal vectors is 1 21 | } 22 | 23 | #[test] 24 | fn test_manhattan() { 25 | let a = &[1.0, 2.0, 3.0]; 26 | let b = &[4.0, 5.0, 6.0]; 27 | let dist = manhattan(a, b); 28 | assert!(approx_eq(dist, 9.0, 1e-5)); 29 | } 30 | 31 | #[test] 32 | fn test_chebyshev() { 33 | let a = &[1.0, 2.0, 3.0]; 34 | let b = &[4.0, 5.0, 7.0]; 35 | let dist = chebyshev(a, b); 36 | assert!(approx_eq(dist, 4.0, 1e-5)); 37 | } 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | .pytest_cache/ 6 | *.py[cod] 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | .venv/ 14 | env/ 15 | bin/ 16 | build/ 17 | develop-eggs/ 18 | dist/ 19 | eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | include/ 26 | man/ 27 | venv/ 28 | *.egg-info/ 29 | .installed.cfg 30 | *.egg 31 | 32 | # Installer logs 33 | pip-log.txt 34 | pip-delete-this-directory.txt 35 | pip-selfcheck.json 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .cache 42 | nosetests.xml 43 | coverage.xml 44 | 45 | # Translations 46 | *.mo 47 | 48 | # Mr Developer 49 | .mr.developer.cfg 50 | .project 51 | .pydevproject 52 | 53 | # Rope 54 | .ropeproject 55 | 56 | # Django stuff: 57 | *.log 58 | *.pot 59 | 60 | .DS_Store 61 | 62 | # Sphinx documentation 63 | docs/_build/ 64 | 65 | # PyCharm 66 | .idea/ 67 | 68 | # VSCode 69 | .vscode/ 70 | 71 | # Pyenv 72 | .python-version 73 | 74 | *.json -------------------------------------------------------------------------------- /scripts/filter_example.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from rust_annie import AnnIndex, Distance 3 | from typing import Set, Tuple 4 | 5 | index = AnnIndex.new(3, Distance.Euclidean) 6 | data = np.array( 7 | [ 8 | [0.1, 0.2, 0.3], 9 | [1.0, 1.0, 1.0], 10 | [2.0, 2.0, 2.0], 11 | [3.0, 3.0, 3.0], 12 | ], 13 | dtype=np.float32, 14 | ) 15 | ids = np.array([1, 2, 3, 4], dtype=np.int64) 16 | 17 | index.add(data, ids) 18 | 19 | 20 | def even_id_filter(i: int) -> bool: 21 | """ 22 | Filter function to keep only even numbered IDs. 23 | 24 | Args: 25 | i (int): An ID. 26 | 27 | Returns: 28 | bool: True if ID is even, False otherwise. 29 | """ 30 | return i % 2 == 0 31 | 32 | 33 | query = np.array([0.0, 0.0, 0.0], dtype=np.float32) 34 | allowed_ids: Set[int] = set(filter(even_id_filter, ids)) 35 | result: Tuple[np.ndarray, np.ndarray] = index.search_filter( 36 | query, k=2, allowed_ids=list(allowed_ids) 37 | ) 38 | ids, dists = result[0], result[1] 39 | 40 | print("Filtered IDs:", ids) 41 | print("Distances:", dists) 42 | -------------------------------------------------------------------------------- /tests/test_hnsw.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from rust_annie import PyHnswIndex 3 | import pytest 4 | import os 5 | 6 | 7 | def test_hnsw_basic(): 8 | dim = 64 9 | index = PyHnswIndex(dims=dim) 10 | 11 | # Generate sample data 12 | data = np.random.rand(1000, dim).astype(np.float32) 13 | ids = np.arange(1000, dtype=np.int64) 14 | 15 | # Add to index 16 | index.add(data, ids) 17 | 18 | # Generate a random query 19 | query = np.random.rand(dim).astype(np.float32) 20 | 21 | # Search 22 | retrieved_ids = index.search(query, k=10) 23 | 24 | # Assertions 25 | retrieved_ids = np.array(retrieved_ids) 26 | assert retrieved_ids.shape == (10,) 27 | assert issubclass(retrieved_ids.dtype.type, np.integer) 28 | 29 | 30 | # Deprecated test since PyHnswConfig no longer exists 31 | # def test_invalid_config(): 32 | # config = PyHnswConfig(m=0, ef_construction=10, ef_search=0, max_elements=0) 33 | # with pytest.raises(ValueError): 34 | # config.validate() 35 | 36 | # Future implementation 37 | # def test_hnsw_save_load(tmp_path): 38 | # ... 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Programmers-Paradise 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /scripts/compare.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import time 3 | from rust_annie import PyHnswIndex, AnnIndex 4 | 5 | 6 | def benchmark(index_cls, name, dim=128, n=10_000, q=100, k=10): 7 | print(f"\nBenchmarking {name} with {n} vectors (dim={dim})...") 8 | 9 | # Data 10 | data = np.random.rand(n, dim).astype(np.float32) 11 | ids = np.arange(n, dtype=np.int64) 12 | queries = np.random.rand(q, dim).astype(np.float32) 13 | 14 | # Index setup 15 | index = index_cls(dims=dim) 16 | for i in range(n): 17 | index.add(data[i], ids[i]) 18 | 19 | # Warm-up + Timing 20 | times = [] 21 | # Batch search for improved performance and realistic benchmarking 22 | start = time.perf_counter() 23 | results = index.search(queries, k=k) 24 | elapsed = (time.perf_counter() - start) * 1000 25 | times = [elapsed / q] * q # Approximate per-query time 26 | 27 | print(f" Avg query time: {np.mean(times):.3f} ms") 28 | print(f" Max query time: {np.max(times):.3f} ms") 29 | print(f" Min query time: {np.min(times):.3f} ms") 30 | 31 | 32 | if __name__ == "__main__": 33 | benchmark(PyHnswIndex, "HNSW") 34 | benchmark(AnnIndex, "Brute-Force") 35 | -------------------------------------------------------------------------------- /src/gpu/device.rs: -------------------------------------------------------------------------------- 1 | use crate::gpu::GpuError; 2 | 3 | #[cfg(feature = "cuda")] 4 | use crate::gpu::cuda; 5 | #[cfg(feature = "rocm")] 6 | use crate::gpu::rocm; 7 | 8 | static ACTIVE_DEVICE: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); 9 | 10 | pub fn set_active_device(device_id: usize) -> Result<(), GpuError> { 11 | #[cfg(feature = "cuda")] 12 | { 13 | if device_id >= cuda::device_count() { 14 | return Err(GpuError::DeviceIndex(device_id)); 15 | } 16 | cust::device::set_device(device_id as u32).map_err(GpuError::Cuda)?; 17 | } 18 | 19 | #[cfg(feature = "rocm")] 20 | { 21 | if device_id >= rocm::device_count() { 22 | return Err(GpuError::DeviceIndex(device_id)); 23 | } 24 | hip_runtime::device::set_device(device_id as u32).map_err(|e| GpuError::Rocm(e.into()))?; 25 | } 26 | 27 | #[cfg(not(any(feature = "cuda", feature = "rocm")))] 28 | { 29 | return Err(GpuError::NoBackend); 30 | } 31 | 32 | ACTIVE_DEVICE.store(device_id, std::sync::atomic::Ordering::SeqCst); 33 | Ok(()) 34 | } 35 | 36 | pub fn get_active_device() -> usize { 37 | ACTIVE_DEVICE.load(std::sync::atomic::Ordering::SeqCst) 38 | } -------------------------------------------------------------------------------- /.github/workflows/security-audit.yml: -------------------------------------------------------------------------------- 1 | name: Security Audit 2 | 3 | permissions: 4 | contents: read 5 | security-events: write 6 | 7 | on: 8 | push: 9 | branches: [main] 10 | pull_request: 11 | branches: [main] 12 | schedule: 13 | - cron: '0 0 * * 0' # weekly 14 | 15 | jobs: 16 | audit: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout code 20 | uses: actions/checkout@v4 21 | - name: Install Rust 22 | uses: actions-rs/toolchain@v1 23 | with: 24 | toolchain: stable 25 | override: true 26 | - name: Cache cargo registry 27 | uses: actions/cache@v4 28 | with: 29 | path: | 30 | ~/.cargo/registry 31 | ~/.cargo/git 32 | key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} 33 | - name: Install cargo-audit 34 | run: cargo install cargo-audit 35 | - name: Run cargo audit 36 | run: cargo audit --deny warnings 37 | - name: Install cargo-sbom 38 | run: cargo install cargo-sbom 39 | - name: Generate SBOM 40 | run: cargo sbom > sbom.spdx.json 41 | - name: Upload SBOM artifact 42 | uses: actions/upload-artifact@v4 43 | with: 44 | name: sbom 45 | path: sbom.spdx.json 46 | -------------------------------------------------------------------------------- /fuzz/fuzz_targets/input_validation.rs: -------------------------------------------------------------------------------- 1 | use libfuzzer_sys::fuzz_target; 2 | use rust_annie::index::AnnIndex; 3 | use rust_annie::metrics::Distance; 4 | 5 | fuzz_target!(|data: &[u8]| { 6 | // Fuzz input validation for AnnIndex 7 | if data.len() < 4 { 8 | return; 9 | } 10 | let dim = (data[0] as usize % 32) + 1; // dimension between 1 and 32 11 | let metric = match data[1] % 4 { 12 | 0 => Distance::Euclidean(), 13 | 1 => Distance::Cosine(), 14 | 2 => Distance::Manhattan(), 15 | _ => Distance::Chebyshev(), 16 | }; 17 | let index = AnnIndex::new(dim, metric); 18 | // Try adding random data 19 | if let Ok(mut idx) = index { 20 | let n = (data[2] as usize % 8) + 1; 21 | let mut vecs = Vec::with_capacity(n); 22 | for i in 0..n { 23 | let start = 3 + i * dim; 24 | let end = start + dim; 25 | if end > data.len() { break; } 26 | let v: Vec = data[start..end].iter().map(|b| *b as f32).collect(); 27 | vecs.push(v); 28 | } 29 | let ids: Vec = (0..vecs.len()).collect(); 30 | if !vecs.is_empty() && vecs.len() == ids.len() { 31 | // Ignore errors, just check for panics/crashes 32 | let _ = idx.add_vecs(&vecs, &ids); 33 | } 34 | } 35 | }); 36 | -------------------------------------------------------------------------------- /scripts/batch_ben.py: -------------------------------------------------------------------------------- 1 | import time, json, argparse 2 | import numpy as np 3 | from rust_annie import AnnIndex, Distance 4 | 5 | 6 | def benchmark_batch(N=10000, D=64, k=10, batch_size=64, repeats=20): 7 | # 1. Prepare random data 8 | data = np.random.rand(N, D).astype(np.float32) 9 | ids = np.arange(N, dtype=np.int64) 10 | idx = AnnIndex(D, Distance.EUCLIDEAN) 11 | idx.add(data, ids) 12 | 13 | # 2. Prepare query batch 14 | queries = data[:batch_size] 15 | 16 | # Warm-up 17 | idx.search_batch(queries, k, None) # Added None for filter 18 | 19 | # 3. Benchmark Rust batch search 20 | t0 = time.perf_counter() 21 | for _ in range(repeats): 22 | idx.search_batch(queries, k, None) # Added None for filter 23 | t_batch = (time.perf_counter() - t0) / repeats 24 | 25 | results = { 26 | "batch_time_ms": t_batch * 1e3, 27 | "per_query_time_ms": (t_batch / batch_size) * 1e3, 28 | } 29 | 30 | return results 31 | 32 | 33 | if __name__ == "__main__": 34 | parser = argparse.ArgumentParser() 35 | parser.add_argument("--output", type=str, help="Path to write benchmark results") 36 | args = parser.parse_args() 37 | 38 | results = benchmark_batch() 39 | print(json.dumps(results, indent=2)) 40 | 41 | if args.output: 42 | with open(args.output, "w") as f: 43 | json.dump(results, f) 44 | -------------------------------------------------------------------------------- /fuzz/fuzz_targets/distances.rs: -------------------------------------------------------------------------------- 1 | #![no_main] 2 | use libfuzzer_sys::fuzz_target; 3 | use rust_annie::metrics::{euclidean, cosine, manhattan, chebyshev}; 4 | 5 | const QUIET_NAN_MASK: u32 = 0x0040_0000; 6 | 7 | fuzz_target!(|data: &[u8]| { 8 | // Split input into two vectors of f32 9 | let (a, b) = if data.len() < 8 { 10 | return; // Need at least 8 bytes (2 floats) 11 | } else { 12 | let mid = data.len() / 2; 13 | let (left, right) = data.split_at(mid); 14 | ( 15 | bytes_to_f32_vec(left), 16 | bytes_to_f32_vec(right) 17 | ) 18 | }; 19 | 20 | // Ensure vectors are the same length 21 | let len = std::cmp::min(a.len(), b.len()); 22 | if len == 0 { 23 | return; 24 | } 25 | let a = &a[..len]; 26 | let b = &b[..len]; 27 | 28 | // Call all distance functions 29 | let _ = euclidean(a, b); 30 | let _ = cosine(a, b); 31 | let _ = manhattan(a, b); 32 | let _ = chebyshev(a, b); 33 | }); 34 | 35 | fn bytes_to_f32_vec(data: &[u8]) -> Vec { 36 | data.chunks_exact(4) 37 | .map(|chunk| { 38 | let mut bytes = [0u8; 4]; 39 | bytes.copy_from_slice(chunk); 40 | f32::from_ne_bytes(bytes) 41 | }) 42 | .filter(|&f| { 43 | // Filter out signaling NaNs but allow quiet NaNs. 44 | !(f.is_nan() && (f.to_bits() & QUIET_NAN_MASK) == 0) 45 | }) 46 | .collect() 47 | } 48 | -------------------------------------------------------------------------------- /src/gpu/gpu.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "gpu")] 2 | mod gpu { 3 | use cust::prelude::*; 4 | 5 | pub fn l2_distance_gpu(queries: &[f32], corpus: &[f32], dim: usize, n_queries: usize, n_vectors: usize) -> Result, cust::error::CudaError> { 6 | // Load PTX and create context 7 | let ptx = include_str!("kernels/l2_kernel_fp32.ptx"); 8 | let _ctx = cust::quick_init()?; 9 | let module = Module::from_ptx(ptx, &[])?; 10 | let stream = Stream::new(StreamFlags::NON_BLOCKING, None)?; 11 | 12 | // Allocate device buffers 13 | let query_buf = DeviceBuffer::from_slice(queries)?; 14 | let corpus_buf = DeviceBuffer::from_slice(corpus)?; 15 | let mut out_buf = DeviceBuffer::zeroed(n_queries * n_vectors)?; 16 | 17 | // Launch kernel 18 | let func = module.get_function("l2_distance_kernel")?; 19 | unsafe { 20 | launch!(func<<>>( 21 | query_buf.as_device_ptr(), 22 | corpus_buf.as_device_ptr(), 23 | out_buf.as_device_ptr(), 24 | n_queries as i32, 25 | n_vectors as i32, 26 | dim as i32 27 | ))?; 28 | } 29 | 30 | stream.synchronize()?; 31 | 32 | let mut out = vec![0.0f32; n_queries * n_vectors]; 33 | out_buf.copy_to(&mut out)?; 34 | out 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/test_threadsafeindex.rs: -------------------------------------------------------------------------------- 1 | #[test] 2 | fn test_search_batch_poisoned_lock() { 3 | use std::sync::{Arc, RwLock}; 4 | use rust_annie::concurrency::ThreadSafeAnnIndex; 5 | use rust_annie::index::AnnIndex; 6 | use rust_annie::metrics::Distance; 7 | use pyo3::Python; 8 | use numpy::PyArray2; 9 | use ndarray::Array2; 10 | use numpy::PyArrayMethods; 11 | 12 | // Initialize the Python interpreter immediately 13 | pyo3::prepare_freethreaded_python(); 14 | 15 | // Poison the lock 16 | let lock = Arc::new(RwLock::new(AnnIndex::new(2, Distance::Euclidean()).unwrap())); 17 | { 18 | let poisoned = Arc::clone(&lock); 19 | let _ = std::thread::spawn(move || { 20 | // This will panic, triggering poisoning 21 | let _guard = poisoned.write().unwrap(); 22 | panic!("Poisoning lock intentionally"); 23 | }).join(); 24 | } 25 | 26 | // Use internal helper constructor 27 | let wrapped = ThreadSafeAnnIndex::from_arc(lock); 28 | 29 | Python::with_gil(|py| { 30 | let arr = vec![[1.0_f32, 2.0], [3.0, 4.0]]; 31 | let arr = PyArray2::from_owned_array(py, Array2::from_shape_vec((2, 2), arr.concat()).unwrap()); 32 | let result = wrapped.search_batch(py, arr.readonly(), 1); 33 | assert!(result.is_err()); 34 | let msg = format!("{:?}", result.unwrap_err()); 35 | println!("Search returned error: {}", msg); 36 | assert!(msg.to_lowercase().contains("poison")); 37 | }); 38 | } 39 | -------------------------------------------------------------------------------- /benches/ann_bench.rs: -------------------------------------------------------------------------------- 1 | // benches/ann_bench.rs 2 | 3 | use criterion::{criterion_group, criterion_main, Criterion}; 4 | use rust_annie::index::{AnnIndex, Distance}; 5 | use rust_annie::hnsw::HnswIndex; 6 | use rand::Rng; 7 | 8 | fn generate_data(n: usize, dim: usize) -> Vec> { 9 | let mut rng = rand::thread_rng(); 10 | (0..n).map(|_| (0..dim).map(|_| rng.gen()).collect()).collect() 11 | } 12 | 13 | fn bench_brute_vs_hnsw(c: &mut Criterion) { 14 | let dimensions = [16, 64, 128]; 15 | let num_points = 1000; 16 | let k = 10; 17 | 18 | for &dim in &dimensions { 19 | let data = generate_data(num_points, dim); 20 | let query = data[0].clone(); 21 | let ids: Vec = (0..num_points).map(|i| i as i64).collect(); 22 | 23 | // Brute force 24 | let mut ann = AnnIndex::new(dim, Distance::L2).unwrap(); 25 | ann.add_batch(&data, &ids).unwrap(); 26 | 27 | c.bench_function(&format!("brute_dim_{}", dim), |b| { 28 | b.iter(|| { 29 | let _ = ann.search(&query, k); 30 | }); 31 | }); 32 | 33 | // HNSW 34 | let mut hnsw = HnswIndex::new(dim, Distance::L2).unwrap(); 35 | hnsw.add_batch(&data, &ids).unwrap(); 36 | 37 | c.bench_function(&format!("hnsw_dim_{}", dim), |b| { 38 | b.iter(|| { 39 | let _ = hnsw.search(&query, k); 40 | }); 41 | }); 42 | } 43 | } 44 | 45 | criterion_group!(benches, bench_brute_vs_hnsw); 46 | criterion_main!(benches); 47 | -------------------------------------------------------------------------------- /tests/test_py_index.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pytest 3 | from rust_annie import Index, Distance 4 | 5 | 6 | def test_brute_index_add_search(): 7 | index = Index("brute", 4, Distance.EUCLIDEAN) 8 | assert isinstance(index, Index) 9 | 10 | # Add data points 11 | index.add_item([1.0, 2.0, 3.0, 4.0]) 12 | index.add_item([5.0, 6.0, 7.0, 8.0]) 13 | index.build() 14 | 15 | # Search 16 | query = np.array([1.1, 2.1, 3.1, 4.1], dtype=np.float32) 17 | ids, dists = index.search(query, k=1) 18 | 19 | assert isinstance(ids, np.ndarray) 20 | assert isinstance(dists, np.ndarray) 21 | assert ids.shape == (1,) 22 | assert dists.shape == (1,) 23 | 24 | 25 | def test_hnsw_index_add_search(): 26 | index = Index("hnsw", 4, Distance.EUCLIDEAN) 27 | assert isinstance(index, Index) 28 | 29 | # Add data points 30 | index.add_item([1.0, 2.0, 3.0, 4.0]) 31 | index.add_item([5.0, 6.0, 7.0, 8.0]) 32 | index.build() 33 | 34 | # Search 35 | query = np.array([1.1, 2.1, 3.1, 4.1], dtype=np.float32) 36 | ids, dists = index.search(query, k=1) 37 | 38 | assert isinstance(ids, np.ndarray) 39 | assert isinstance(dists, np.ndarray) 40 | assert ids.shape == (1,) 41 | assert dists.shape == (1,) 42 | assert dists[0] == 0.0 # distances are mocked as 0.0 for HNSW currently 43 | 44 | 45 | def test_invalid_backend(): 46 | with pytest.raises(ValueError) as excinfo: 47 | Index("dummy", 4, Distance.EUCLIDEAN) 48 | assert "Unknown backend" in str(excinfo.value) 49 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_annie" 3 | version = "0.2.5" 4 | edition = "2021" 5 | 6 | [lib] 7 | name = "rust_annie" 8 | crate-type = ["cdylib", "rlib"] 9 | 10 | [dependencies] 11 | 12 | rust_annie_macros = { path = "rust_annie_macros/foo" } 13 | pyo3 = { version = "0.25.0" } 14 | hnsw_rs = "0.3.3" 15 | numpy = "0.25.0" 16 | ndarray = "0.16.1" 17 | serde = { version = "1.0.228", features = ["derive"] } 18 | bincode = "1.3.3" 19 | rayon = "1.11.0" 20 | lazy_static = { version = "1.4.0", optional = true } 21 | bit-vec = { version = "0.8.0", features = ["serde"] } 22 | rand = "0.9.0" 23 | criterion = { version = "0.8.1", optional = true } 24 | 25 | # GPU backends 26 | cust = { version = "0.3.0", optional = true } 27 | hip-rs = { version = "1.0.0", optional = true } 28 | bytemuck = { version = "1.24", features = ["derive"] } 29 | half = { version = "2.7", features = ["bytemuck"] } 30 | thiserror = "2.0" 31 | 32 | [features] 33 | cuda = ["cust", "lazy_static"] 34 | rocm = ["hip-rs", "lazy_static"] 35 | 36 | # Forwarding features to control PyO3 from this crate 37 | # Use these in CI/maturin instead of trying to enable dependency features directly. 38 | python-ext = ["pyo3/extension-module"] 39 | python-abi3 = ["pyo3/abi3-py38"] 40 | # On Windows, generate an import library for python3.dll when needed 41 | pyo3-import-lib = ["pyo3/generate-import-lib"] 42 | 43 | [workspace] 44 | members = [".", "fuzz", "rust_annie_macros/foo"] 45 | 46 | [dev-dependencies] 47 | criterion = "0.8" 48 | rand = "0.9" 49 | 50 | [[bench]] 51 | name = "gpu_benchmark" 52 | harness = false 53 | -------------------------------------------------------------------------------- /src/build.rs: -------------------------------------------------------------------------------- 1 | use std::process::Command; 2 | 3 | fn main() { 4 | #[cfg(feature = "rocm")] 5 | compile_hip_kernel(); 6 | } 7 | 8 | #[cfg(feature = "rocm")] 9 | fn compile_hip_kernel() { 10 | use std::env; 11 | use std::path::PathBuf; 12 | // Validate and sanitize build environment 13 | let hipcc_path = match which::which("hipcc") { 14 | Ok(path) => path, 15 | Err(_) => { 16 | eprintln!("hipcc not found in PATH. Aborting HIP kernel build."); 17 | return; 18 | } 19 | }; 20 | let kernel_src = PathBuf::from("kernels/l2_kernel.hip"); 21 | let kernel_out = PathBuf::from("kernels/l2_kernel.hsaco"); 22 | if !kernel_src.exists() { 23 | eprintln!("Kernel source {:?} does not exist.", kernel_src); 24 | return; 25 | } 26 | // Only allow known safe arguments 27 | let args = ["--genco", "-o", kernel_out.to_str().unwrap(), kernel_src.to_str().unwrap()]; 28 | let status = Command::new(hipcc_path) 29 | .args(&args) 30 | .env_clear() 31 | .envs(env::vars().filter(|(k,_)| k == "PATH" || k == "HOME")) 32 | .status(); 33 | let status = match status { 34 | Ok(s) => s, 35 | Err(e) => { 36 | eprintln!("Failed to compile HIP kernel: {}", e); 37 | return; 38 | } 39 | }; 40 | if !status.success() { 41 | eprintln!("HIP kernel compilation failed with exit code: {:?}", status.code()); 42 | return; 43 | } 44 | println!("cargo:rerun-if-changed=kernels/l2_kernel.hip"); 45 | } -------------------------------------------------------------------------------- /benches/gpu_benchmark.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | extern crate criterion; 3 | use criterion::Criterion; 4 | use rust_annie::backends::BackendEnum; 5 | use rust_annie::metrics::Distance; 6 | // Import the AnnBackend trait to use its methods like `add` and `search`. 7 | use rust_annie::backends::ann_backend::AnnBackend; 8 | use rust_annie::gpu::Precision; 9 | use rand::prelude::*; 10 | 11 | fn bench_gpu_search(c: &mut Criterion) { 12 | // FIX: Handle the Result from `new`. 13 | // .expect() is used here because a failure indicates a benchmark setup error, which should cause a panic. 14 | let mut backend = BackendEnum::new("gpu", 128, Distance::Euclidean) 15 | .expect("Failed to create GPU backend for benchmark. Is the backend name correct?"); 16 | 17 | // Add 1M random vectors 18 | let mut rng = rand::thread_rng(); 19 | 20 | // FIX: The original code called a non-existent `batch_add_method`. 21 | // The correct approach is to call the `add` method from the AnnBackend trait in a loop. 22 | for _ in 0..1_000_000 { 23 | let vec: Vec = (0..128).map(|_| rng.gen()).collect(); 24 | backend.add(vec); 25 | } 26 | 27 | let query = vec![0.5; 128]; 28 | 29 | c.bench_function("GPU ANN Search", |b| { 30 | b.iter(|| backend.search(&query, 10)) 31 | }); 32 | 33 | // Precision benchmarks 34 | if let BackendEnum::Gpu(gpu) = &mut backend { 35 | gpu.set_precision(Precision::Fp16); 36 | c.bench_function("GPU ANN Search (FP16)", |b| { 37 | b.iter(|| gpu.search(&query, 10)) 38 | }); 39 | } 40 | } 41 | 42 | criterion_group!(benches, bench_gpu_search); 43 | criterion_main!(benches); -------------------------------------------------------------------------------- /.github/workflows/update-changelog.yml: -------------------------------------------------------------------------------- 1 | name: Update Changelog on PR Merge 2 | 3 | on: 4 | pull_request: 5 | types: [closed] 6 | workflow_dispatch: 7 | inputs: 8 | historical: 9 | description: 'Build changelog from historical PR data' 10 | required: false 11 | type: boolean 12 | default: false 13 | 14 | permissions: 15 | contents: write 16 | pull-requests: read 17 | 18 | jobs: 19 | update-changelog: 20 | name: Update Changelog 21 | runs-on: ubuntu-latest 22 | steps: 23 | - uses: actions/checkout@v4 24 | with: 25 | fetch-depth: 0 26 | token: ${{ secrets.GITHUB_TOKEN }} 27 | 28 | - name: Set up Python 29 | uses: actions/setup-python@v4 30 | with: 31 | python-version: '3.11' 32 | 33 | - name: Update Changelog 34 | env: 35 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 36 | PR_NUMBER: ${{ github.event.pull_request.number }} 37 | PR_TITLE: ${{ github.event.pull_request.title }} 38 | PR_BODY: ${{ github.event.pull_request.body }} 39 | PR_AUTHOR: ${{ github.event.pull_request.user.login }} 40 | PR_URL: ${{ github.event.pull_request.html_url }} 41 | IS_HISTORICAL: ${{ github.event.inputs.historical }} 42 | EVENT_ACTION: ${{ github.event.action }} 43 | run: python .github/scripts/update_changelog.py 44 | 45 | - name: Commit changes 46 | if: ${{ env.CHANGELOG_UPDATED == 'true' }} 47 | run: | 48 | git config user.name "github-actions[bot]" 49 | git config user.email "github-actions[bot]@users.noreply.github.com" 50 | git add .github/CHANGELOG.md 51 | git commit -m "chore: update changelog [skip ci]" 52 | git push 53 | -------------------------------------------------------------------------------- /tests/concurrency_stress.rs: -------------------------------------------------------------------------------- 1 | use std::sync::{Arc, RwLock}; 2 | use rust_annie::concurrency::ThreadSafeAnnIndex; 3 | use rust_annie::index::AnnIndex; 4 | use rust_annie::metrics::Distance; 5 | use std::thread; 6 | use numpy::PyArrayMethods; 7 | use ndarray::Array2; 8 | use numpy::PyArray2; 9 | use pyo3::Python; 10 | 11 | #[test] 12 | fn stress_concurrent_search_and_add() { 13 | pyo3::prepare_freethreaded_python(); 14 | let lock = Arc::new(RwLock::new(AnnIndex::new(8, Distance::Euclidean()).unwrap())); 15 | let wrapped = Arc::new(ThreadSafeAnnIndex::from_arc(lock.clone())); 16 | let mut handles = vec![]; 17 | for _ in 0..32 { 18 | let w = wrapped.clone(); 19 | handles.push(thread::spawn(move || { 20 | Python::with_gil(|py| { 21 | let arr = vec![[1.0_f32; 8], [2.0; 8]]; 22 | let arr = PyArray2::from_owned_array(py, Array2::from_shape_vec((2, 8), arr.concat()).unwrap()); 23 | let _ = w.search_batch(py, arr.readonly(), 1); 24 | }); 25 | })); 26 | } 27 | for h in handles { let _ = h.join(); } 28 | // Add data concurrently 29 | let mut add_handles = vec![]; 30 | for i in 0..16 { 31 | let lock = lock.clone(); 32 | add_handles.push(thread::spawn(move || { 33 | let mut index = lock.write().unwrap(); 34 | Python::with_gil(|py| { 35 | let arr = vec![vec![i as f32; 8]]; 36 | let ids = vec![i]; 37 | let np_data = PyArray2::from_vec2(py, &arr).unwrap(); 38 | let np_ids = numpy::PyArray1::from_slice(py, &ids); 39 | let _ = index.add(py, np_data.readonly(), np_ids.readonly()); 40 | }); 41 | })); 42 | } 43 | for h in add_handles { let _ = h.join(); } 44 | } 45 | -------------------------------------------------------------------------------- /benchmarks/d803e4ed7095fbaf3e975369736f4d714f24ff76-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1752840691.385415, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03719322700000305, "build_memory_mb": 54.16796875, "search_times": [0.010835117999988597, 0.010645545000002699, 0.00986331000000007, 0.00985638800000288, 0.009822094000000448, 0.00988145399999496, 0.010083781000005843, 0.009966793000003804, 0.009872848000000545, 0.009939431999995918, 0.009919184000011683, 0.00989952700000174, 0.009965780999991125, 0.009920096000001877, 0.009884589999998639, 0.01008557400000143, 0.009921388000009301, 0.00990133199999832, 0.009917400999995607, 0.00987949999999671, 0.009929423000002657, 0.00991033799999741, 0.0098931759999914, 0.010101513000009277, 0.009947797999998897, 0.009932188999997038, 0.011658350000004702, 0.012076669999999012, 0.009990107000007242, 0.009921718999990503, 0.009914465999997901, 0.010112583999998037, 0.009923972999999364, 0.009904907999995771, 0.009940022999998632, 0.009928021000007448, 0.009966602000005764, 0.009948229000002584, 0.009901862000006645, 0.010116871999997556, 0.009944982000007485, 0.009910537999999747, 0.009904828000003363, 0.009897303999991891, 0.009886875000006512, 0.009895880999991391, 0.009891672999998491, 0.0101092379999983, 0.009905798999994886, 0.009881785000004584], "search_avg": 0.010046177240000134, "search_p50": 0.009920742000005589, "search_p95": 0.010749810149994942, "search_p99": 0.011871693200001799}, "sklearn": {"build_time": 0.003713879000002862, "build_memory_mb": 0.0, "search_avg": 0.007465562439998337, "search_p50": 0.006889968999999496}, "faiss": {"build_time": 0.007653238000017382, "build_memory_mb": 49.234375, "search_avg": 0.002296336480000036, "search_p50": 0.0022857125000115275}, "annoy": {"build_time": 1.0925859350000167, "build_memory_mb": 67.109375, "search_avg": 4.7700680000275497e-05, "search_p50": 4.740850000928276e-05}} -------------------------------------------------------------------------------- /benchmarks/c21cbd3692fe65cdda43bf891a303df011373ff7-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755566384.806299, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03220490399999676, "build_memory_mb": 54.875, "search_times": [0.005193735000005972, 0.004706005999992158, 0.004188771000002589, 0.0040382699999952365, 0.0038729420000009895, 0.004162000999997417, 0.0041543469999965055, 0.00408862400000487, 0.004098552999991512, 0.004058368000002588, 0.0040626260000067305, 0.004047247000002585, 0.004055211999997255, 0.004196695999993949, 0.004180915999995705, 0.004164255000006278, 0.004105787000000305, 0.004098783000003436, 0.004022540999997659, 0.004199912000004247, 0.004246859000005543, 0.004175266000004285, 0.004159245000010969, 0.004104101999999443, 0.004115904999991926, 0.004168593000002829, 0.004191214999991644, 0.004249364000003197, 0.00417962399998828, 0.004104474000001801, 0.004019866000007255, 0.004107619999999201, 0.0040350640000070825, 0.004036496999987094, 0.004069839000010234, 0.004276274000005742, 0.004209870000011051, 0.004197126999997636, 0.004062445999991837, 0.004060551999998552, 0.004032410000007758, 0.0040745879999946055, 0.004034984000000463, 0.0040156080000031125, 0.0041849339999942, 0.003885074000010036, 0.003959393000002365, 0.003883811999997988, 0.003912886999998477, 0.003906635000006986], "search_avg": 0.004127114380000591, "search_p50": 0.00410144250000144, "search_p95": 0.004264164500004597, "search_p99": 0.004954747789999202}, "sklearn": {"build_time": 0.003573865000007004, "build_memory_mb": 0.0, "search_avg": 0.008701902500000074, "search_p50": 0.007312811499993188}, "faiss": {"build_time": 0.008231569999992416, "build_memory_mb": 49.390625, "search_avg": 0.002428718040000604, "search_p50": 0.0023902220000024954}, "annoy": {"build_time": 1.0866203749999954, "build_memory_mb": 70.0, "search_avg": 4.7058280000840116e-05, "search_p50": 4.618100000186587e-05}} -------------------------------------------------------------------------------- /benchmarks/5c3ab2f4907644233d0a373de6ddc1bc753cca35-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765867899.2086, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05006348300003083, "build_memory_mb": 57.921875, "search_times": [0.005461498999920877, 0.004941400000006979, 0.004393904999915321, 0.004555640999910793, 0.004376631000013731, 0.004498282999975345, 0.004406169000048976, 0.004341377000059765, 0.004569482000079006, 0.00456703599991215, 0.004616312000052858, 0.004522326000028443, 0.004488098000024365, 0.004338216999940414, 0.004352301000039915, 0.0043380839999827, 0.004475553000020227, 0.004284601999984261, 0.004290987999979734, 0.004304616000013084, 0.0043577609999374545, 0.004489568000053623, 0.00453325799992399, 0.004447444999982508, 0.004549485999973513, 0.004585630000065066, 0.0045283179999842105, 0.004418451000105961, 0.00447081499999058, 0.004610337000030995, 0.004453812999940965, 0.004275930000062544, 0.0043304179999950065, 0.004328028999907474, 0.00437671899999259, 0.004330091000042557, 0.004369523000036679, 0.004357301000027292, 0.0042905779999955485, 0.004379584000048453, 0.004341702000033365, 0.00432755500003168, 0.004392617000007704, 0.004690305999929478, 0.004626283999982661, 0.004485025999997561, 0.0045817980000038006, 0.004454637999970146, 0.004587254999933066, 0.004632850000007238], "search_avg": 0.004474512119998053, "search_p50": 0.0044506289999617366, "search_p95": 0.00466445079996447, "search_p99": 0.005206650489963066}, "sklearn": {"build_time": 0.004637570999989293, "build_memory_mb": 0.0, "search_avg": 0.00946653963999779, "search_p50": 0.008429228499949204}, "faiss": {"build_time": 0.014708460000065315, "build_memory_mb": 49.38671875, "search_avg": 0.0030988780999950906, "search_p50": 0.0030500629999892226}, "annoy": {"build_time": 0.9663941810000551, "build_memory_mb": 66.9921875, "search_avg": 4.166598000210797e-05, "search_p50": 4.108950003001155e-05}} -------------------------------------------------------------------------------- /benchmarks/d4b95c1036bcd398d6f7436055352a74a4dd41ed-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1756083862.282034, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03184332300000392, "build_memory_mb": 54.875, "search_times": [0.005247891999999865, 0.004703176999981906, 0.003931871000020237, 0.0038381139999899005, 0.00428238200001374, 0.004146065000014687, 0.004060964999979433, 0.004045235000006642, 0.004095049000000017, 0.00423140600000238, 0.004094588000015165, 0.004039656999992758, 0.004262696000012056, 0.0041824040000051355, 0.0041150570000070275, 0.004106941999992841, 0.0040632589999916036, 0.004027431999986675, 0.004018263999995497, 0.004007344000001467, 0.0038702450000016597, 0.003987323999979253, 0.003939354999999978, 0.0039073949999988145, 0.004041889000006904, 0.004068510000024617, 0.004072178999990683, 0.0040696609999884, 0.004142749000010326, 0.00397613399999841, 0.003977477000006502, 0.004033093000003873, 0.004066532999985384, 0.003928223999992042, 0.0038799229999995077, 0.0038473909999936495, 0.004129204000008713, 0.004033996000003981, 0.00404958400000055, 0.004029365000008056, 0.004022461999994675, 0.004045074999993403, 0.003992234999998345, 0.004013052000004791, 0.0039340449999940574, 0.004063841000004231, 0.003989189000009219, 0.004290187999998807, 0.0041446630000052664, 0.004079859999990276], "search_avg": 0.004082492800000068, "search_p50": 0.0040451550000000225, "search_p95": 0.004286675300005527, "search_p99": 0.004980981649991064}, "sklearn": {"build_time": 0.0034173499999781143, "build_memory_mb": 0.0, "search_avg": 0.007668224159999113, "search_p50": 0.007156372499991903}, "faiss": {"build_time": 0.007978078000007827, "build_memory_mb": 49.25, "search_avg": 0.00224383024000133, "search_p50": 0.0022292875000005097}, "annoy": {"build_time": 1.1099468799999954, "build_memory_mb": 66.43359375, "search_avg": 4.751596000119207e-05, "search_p50": 4.6362500000896034e-05}} -------------------------------------------------------------------------------- /benchmarks/07514ec63bcce152303930e1e6ee27730c3c11c5-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762391101.445277, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05501366800001506, "build_memory_mb": 57.96875, "search_times": [0.005245491999971819, 0.004455843000016557, 0.003847920999987764, 0.003799861000004512, 0.0037796629999888864, 0.003812084000003324, 0.0038573810000457343, 0.003824383999983638, 0.0038904529999967963, 0.003957463999995525, 0.003933910999990076, 0.003869822000012846, 0.0038807700000234036, 0.0038961629999789693, 0.00393335000001116, 0.0040310419999514124, 0.003994450999982746, 0.0038461780000034196, 0.004168647999961195, 0.004454231000011077, 0.004579824999950688, 0.0044659430000137945, 0.004254288000026918, 0.004120641000042724, 0.00414792800000896, 0.00404450700000325, 0.004049456000018381, 0.004038406000006489, 0.004035149000003457, 0.004360477999966861, 0.004181722999987869, 0.004184839000004104, 0.004084471999988182, 0.004125025000007554, 0.00421329099998502, 0.004788784000027135, 0.004621864999990066, 0.004930516000001717, 0.004715508000003865, 0.004371196000022337, 0.004247534999990421, 0.004143653999960861, 0.004287318999956824, 0.00426350499998307, 0.004179125999996813, 0.004130336999992323, 0.004074235000018689, 0.004030370000009498, 0.004240072000015971, 0.003964297000038641], "search_avg": 0.0041670680399988665, "search_p50": 0.004122833000025139, "search_p95": 0.004755809800016664, "search_p99": 0.005091153759986468}, "sklearn": {"build_time": 0.00426929600001813, "build_memory_mb": 0.125, "search_avg": 0.009052947839996932, "search_p50": 0.00773201349997521}, "faiss": {"build_time": 0.00919100700002673, "build_memory_mb": 49.234375, "search_avg": 0.0029292197399990983, "search_p50": 0.0029013964999649033}, "annoy": {"build_time": 1.0983063310000034, "build_memory_mb": 66.5390625, "search_avg": 5.1063480003676884e-05, "search_p50": 5.161099997508245e-05}} -------------------------------------------------------------------------------- /benchmarks/1df9a54ced2a883521ebd12379b1ecb9dd1df83d-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1756170176.58097, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.04535141600000259, "build_memory_mb": 54.75, "search_times": [0.005281351999997241, 0.00481338899999173, 0.004003037000003928, 0.004046508000001836, 0.004226354000010701, 0.003943876999997542, 0.003948575999999093, 0.0041882729999969115, 0.004286716999999385, 0.0038727649999970026, 0.004092545000005998, 0.004091623000007871, 0.004013888000002908, 0.0041459149999951705, 0.004081352999989463, 0.0040057020000006105, 0.003898672999994801, 0.003924310000002151, 0.003920793999995453, 0.003910454999996205, 0.003906267000004959, 0.0039028409999986025, 0.0038224709999923334, 0.003911075999994296, 0.003921655999988616, 0.003912427999992474, 0.0039378360000057455, 0.003926956000000814, 0.003867235000001301, 0.00387865500000828, 0.0038674449999973604, 0.0039029710000022533, 0.003977138999999852, 0.004173245000004044, 0.0040577890000008665, 0.0040886470000032205, 0.0040510080000046855, 0.004023105000001692, 0.004059233000006657, 0.004080112000011127, 0.003986616999995363, 0.004036630000001651, 0.003957252000006406, 0.004071796000005179, 0.004020088999993732, 0.004286467000000016, 0.0038968599999975595, 0.003993129000008366, 0.004220071999995412, 0.004156052999988447], "search_avg": 0.004051783719999947, "search_p50": 0.004004369500002269, "search_p95": 0.004286604499999669, "search_p99": 0.00505205012999454}, "sklearn": {"build_time": 0.003454603999998085, "build_memory_mb": 0.125, "search_avg": 0.007671107559999939, "search_p50": 0.007174052999992853}, "faiss": {"build_time": 0.008036322000009477, "build_memory_mb": 49.25, "search_avg": 0.0022530722600004084, "search_p50": 0.002245874999985631}, "annoy": {"build_time": 1.074076013000024, "build_memory_mb": 70.265625, "search_avg": 4.5351759998766285e-05, "search_p50": 4.43124999947031e-05}} -------------------------------------------------------------------------------- /benchmarks/597fbb8b28fb4d09024ab9c2e128460c3cb0ba0a-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755133677.719066, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.0317262929999913, "build_memory_mb": 54.875, "search_times": [0.005058993000005785, 0.004505109000007224, 0.00396426099999303, 0.003832332999991195, 0.004172990000000709, 0.004065650000001142, 0.0040035240000122485, 0.003930117000010114, 0.004074315999986311, 0.004049328999997215, 0.004022119999973484, 0.004005347000003212, 0.004056222000002663, 0.003977665000007846, 0.004026245999995126, 0.004064868000000388, 0.004004945999980691, 0.0039379209999879095, 0.00398985799998286, 0.004007310999980973, 0.004009334000016906, 0.004018201999997473, 0.003984048000006624, 0.003998224000014261, 0.004197325000006913, 0.003966485000006514, 0.003950013999997282, 0.003975621999984469, 0.003940313999976297, 0.003999898999978768, 0.003959911999999122, 0.004060841000011806, 0.004032488000007106, 0.004053695999999718, 0.004021948000001885, 0.0039981959999977335, 0.004038860000008526, 0.0038345090000007076, 0.0038714369999865994, 0.0038202830000102495, 0.0037665119999985563, 0.004117747000009331, 0.0040244230000041625, 0.004075768000006974, 0.004126393000007056, 0.004033859999992728, 0.004030623999994987, 0.004054498999977341, 0.004018511999987595, 0.004008242999987033], "search_avg": 0.004034746879997897, "search_p50": 0.00401376800000719, "search_p95": 0.004186374250004121, "search_p99": 0.004787589840006489}, "sklearn": {"build_time": 0.0035139710000180457, "build_memory_mb": 0.0, "search_avg": 0.007584807279998245, "search_p50": 0.00701521349998302}, "faiss": {"build_time": 0.008043695999987222, "build_memory_mb": 49.41796875, "search_avg": 0.002257464440000945, "search_p50": 0.0022490835000041898}, "annoy": {"build_time": 1.0692795630000091, "build_memory_mb": 67.50390625, "search_avg": 4.4138580000208095e-05, "search_p50": 4.240399999844158e-05}} -------------------------------------------------------------------------------- /benchmarks/6626ac2a3c3b13737911d8ffd6ec124df4161b4d-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755220076.958835, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.031804198000003225, "build_memory_mb": 54.875, "search_times": [0.005000486000000137, 0.004518913999987717, 0.00439927899998338, 0.004054714000005788, 0.004009719999999106, 0.004107993999980408, 0.003993168999983254, 0.00399216700000693, 0.004051958999980343, 0.004152527000002237, 0.004042106000014201, 0.003773717999990822, 0.003813551999996889, 0.004079380999996829, 0.004083027000007178, 0.004069461999989699, 0.004034255999982861, 0.003990694999998823, 0.0039918159999956515, 0.003993528999984619, 0.0040652639999905205, 0.003972394000015811, 0.003992007000022113, 0.004005883000019139, 0.004034455999999409, 0.0040510279999921295, 0.004034727000004068, 0.003963102000000163, 0.004002713000005542, 0.0040199889999996685, 0.004001103999996758, 0.003941962999988391, 0.003994721999987405, 0.004004589999993868, 0.003770231000004287, 0.0037929279999957544, 0.0037753009999903497, 0.0037959189999980936, 0.0037507350000112183, 0.003798333999981196, 0.0038118960000019797, 0.003992697999990469, 0.0039011899999934485, 0.0039024249999783933, 0.0040009770000040135, 0.003994320999993306, 0.003924320000010084, 0.003924841000014112, 0.004025719999987132, 0.004018776999998863], "search_avg": 0.004008340519997091, "search_p50": 0.003997849499995709, "search_p95": 0.004288240599991866, "search_p99": 0.00476451571999405}, "sklearn": {"build_time": 0.0032389860000137105, "build_memory_mb": 0.0, "search_avg": 0.008967686220000815, "search_p50": 0.00842239450001614}, "faiss": {"build_time": 0.00868677999997658, "build_memory_mb": 49.3828125, "search_avg": 0.0022230259400032536, "search_p50": 0.002222541999998384}, "annoy": {"build_time": 1.0810212129999854, "build_memory_mb": 67.1875, "search_avg": 4.643097999746715e-05, "search_p50": 4.724850001025516e-05}} -------------------------------------------------------------------------------- /benchmarks/7e281dde029f9202ef98bc07bc0d4a9cd91f0ff5-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761181305.925189, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.04829624399997101, "build_memory_mb": 56.76953125, "search_times": [0.005502814000010403, 0.005662457000028098, 0.0049852390000069136, 0.0044881179999833876, 0.004385051000042495, 0.004428056999984165, 0.004339426000001367, 0.00480074400002195, 0.004458483999997043, 0.0044097580000084236, 0.0043870889999766405, 0.0045554150000270965, 0.004461248999973577, 0.0045138879999626624, 0.004604187000040838, 0.004355516999964948, 0.004566855000007308, 0.004605723999986822, 0.004495272000042405, 0.004608458000006976, 0.0044818439999971815, 0.004598895000015091, 0.004718684000010853, 0.005243684999982179, 0.004996832000017548, 0.004635540000037963, 0.004527349999989383, 0.004566038000007211, 0.00442644900005007, 0.004440611000006811, 0.004524627000023429, 0.004642198999988523, 0.004589107000015247, 0.004470934000039506, 0.004547080999998343, 0.004563488999963283, 0.004577530000005936, 0.006334336000008989, 0.00597273400001086, 0.005998876000035125, 0.005899896000016724, 0.005948931999967044, 0.006857253000021046, 0.005572730000039883, 0.004375625999955446, 0.004545267999958469, 0.004589802999987569, 0.004619617000003018, 0.004616434000013214, 0.004466332999982114], "search_avg": 0.004819250700004432, "search_p50": 0.004572192500006622, "search_p95": 0.005987112100024205, "search_p99": 0.006601023670015137}, "sklearn": {"build_time": 0.004577229999995325, "build_memory_mb": 0.0, "search_avg": 0.007843553699995027, "search_p50": 0.006492195499987474}, "faiss": {"build_time": 0.015405621000013525, "build_memory_mb": 49.34375, "search_avg": 0.002656617499997083, "search_p50": 0.0025989769999910095}, "annoy": {"build_time": 0.9651340429999777, "build_memory_mb": 70.65625, "search_avg": 4.291877999548888e-05, "search_p50": 3.945049999742878e-05}} -------------------------------------------------------------------------------- /benchmarks/8113504ebc56a17f939d473d65d79fbafef9ca16-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765866759.077668, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05080671199999642, "build_memory_mb": 58.02734375, "search_times": [0.005198220000011133, 0.004836484999998447, 0.004488274000038928, 0.00459070899995595, 0.004539273999967008, 0.004557710000028692, 0.004583400999990772, 0.004726602999994611, 0.004567004000023189, 0.0046670910000443655, 0.004617777999953887, 0.004445450999980949, 0.004407275000005484, 0.004463993999991089, 0.004555503999995381, 0.004403220000028796, 0.004397060000030706, 0.00440327299997989, 0.004639257000008001, 0.004618840000034652, 0.004697335000003022, 0.004544779999946513, 0.004356416999996782, 0.004487052999991192, 0.004631259999996473, 0.0046963639999830775, 0.004576081999971393, 0.004675603999999112, 0.00457393200002798, 0.004665891999991345, 0.004508290999979181, 0.005251866000037353, 0.004601046999994196, 0.004768662000003587, 0.004675713999972686, 0.004685257000005549, 0.004731285999980628, 0.004479423000020688, 0.004848930000036944, 0.004718280000020059, 0.004726954000034311, 0.00489943200000198, 0.004793118999998569, 0.0045738260000121045, 0.004746083999975781, 0.004833851000000777, 0.004657167999994272, 0.0045771559999820965, 0.0048707790000435125, 0.004792694000002484], "search_avg": 0.004647019220001312, "search_p50": 0.0046250500000155625, "search_p95": 0.00488653815002067, "search_p99": 0.005225579460024506}, "sklearn": {"build_time": 0.0052314719999912995, "build_memory_mb": 0.0, "search_avg": 0.009001997900003288, "search_p50": 0.008418807499992909}, "faiss": {"build_time": 0.015710639000019455, "build_memory_mb": 49.1640625, "search_avg": 0.0031473481999944397, "search_p50": 0.0031148224999810736}, "annoy": {"build_time": 0.95856416700002, "build_memory_mb": 67.921875, "search_avg": 4.3841660003636205e-05, "search_p50": 4.208149999840316e-05}} -------------------------------------------------------------------------------- /benchmarks/91e647c899e9c25b27625ed8eb20761d74f2e4d2-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1766192611.906602, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05075252200003888, "build_memory_mb": 57.96875, "search_times": [0.005394247999959134, 0.004855265999992753, 0.00442096000000447, 0.004404077999993206, 0.004375624999966021, 0.004421150999974088, 0.004425246999971932, 0.004642708999995193, 0.004380808999997043, 0.004486967999980607, 0.00435711000000083, 0.004434880000019348, 0.004499492000036298, 0.004380277999985083, 0.004363951000016186, 0.004383291999999983, 0.00458133199998656, 0.0048270329999695605, 0.005012472999965212, 0.0048525280000149, 0.004597070000045278, 0.0046755370000255425, 0.004580311000040638, 0.004430743000000348, 0.004622908999976971, 0.004659223000032853, 0.004395900000019992, 0.0044705140000473875, 0.0045562689999769646, 0.004456550999975661, 0.004373829000030582, 0.004532279999978073, 0.004618826000012177, 0.0044474349999745755, 0.004533788999992794, 0.004440909000038573, 0.0046471169999904305, 0.004634592000002158, 0.004618814000025395, 0.0055272719999948094, 0.004662160999998832, 0.0045611059999828285, 0.0044225359999927605, 0.004408633000025475, 0.0046638430000029985, 0.004623457000036524, 0.004555932000016583, 0.00449434500001189, 0.004607069999963187, 0.004584153999985574], "search_avg": 0.004578051140000526, "search_p50": 0.004544860500004688, "search_p95": 0.0049417298499776045, "search_p99": 0.005462090239977328}, "sklearn": {"build_time": 0.0046626510000464805, "build_memory_mb": 0.0, "search_avg": 0.009089992260001054, "search_p50": 0.008434227500003999}, "faiss": {"build_time": 0.015326738999988265, "build_memory_mb": 49.25, "search_avg": 0.0030186187200013136, "search_p50": 0.003005906499993216}, "annoy": {"build_time": 0.9567970290000289, "build_memory_mb": 66.9609375, "search_avg": 4.3250539998780365e-05, "search_p50": 4.113350001944127e-05}} -------------------------------------------------------------------------------- /benchmarks/989de3b047b2880f4f33ba47717df855b883852c-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754183832.89723, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03166473999999653, "build_memory_mb": 55.0, "search_times": [0.005284265999989657, 0.004722970000003102, 0.004295443000003729, 0.005197174000002747, 0.0054844990000049165, 0.005192656000005513, 0.005196069999996666, 0.005174601999996753, 0.005123776999994334, 0.005106897000004551, 0.005119849999999815, 0.005148241000000553, 0.0052753490000014835, 0.0054058919999988575, 0.0052074320000059515, 0.005165074000004211, 0.005256805000001918, 0.005296518999998057, 0.005566723000001161, 0.005143614000004959, 0.005255673999997157, 0.0052427090000009, 0.00513096000000246, 0.005272433000001797, 0.005145166999994899, 0.005101365000001579, 0.0052067719999939754, 0.005184420000006185, 0.005018450999997981, 0.0045459300000061376, 0.004036941999999044, 0.003906678999996416, 0.004203892999996128, 0.004067758999994453, 0.00407664600000146, 0.004047690999996689, 0.0040291069999938145, 0.004017284999989101, 0.004092675999999074, 0.003966711000003897, 0.0038454549999897836, 0.003885891999999558, 0.003894926999990389, 0.0038623760000007223, 0.0038682389999991074, 0.003939551000001984, 0.0038628770000030954, 0.004176842000006786, 0.003913100999994867, 0.003885410000009415], "search_avg": 0.004680955859999756, "search_p50": 0.005104131000003065, "search_p95": 0.005356674149998497, "search_p99": 0.005526433240003001}, "sklearn": {"build_time": 0.003298725999997032, "build_memory_mb": 0.0, "search_avg": 0.007681525219999799, "search_p50": 0.007062108500008435}, "faiss": {"build_time": 0.007698374000000285, "build_memory_mb": 49.421875, "search_avg": 0.002206992980000564, "search_p50": 0.0022033555000007254}, "annoy": {"build_time": 1.0867634940000102, "build_memory_mb": 67.12109375, "search_avg": 4.739829999920175e-05, "search_p50": 4.51639999923259e-05}} -------------------------------------------------------------------------------- /benchmarks/dd72c07f97aefa61cc58538a202dc532e402016b-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765678207.70427, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.04905767600001809, "build_memory_mb": 57.9453125, "search_times": [0.005409060000005184, 0.0048531790000083674, 0.00436754099999348, 0.004367002999998704, 0.004552110000020093, 0.004446079000018699, 0.0042782289999934164, 0.004492178999981888, 0.004403131000003668, 0.004722399000002042, 0.004442067000013594, 0.004373797999988938, 0.004350023000000647, 0.004414694000018926, 0.004356876000002785, 0.004372870999986844, 0.004666229999997995, 0.004772512000016604, 0.004691225000016175, 0.004766343000000006, 0.004499753999994027, 0.004369741999994403, 0.00441998200000171, 0.004351017000004731, 0.004321887000003244, 0.00442197800001054, 0.004638193000005231, 0.004523040999998784, 0.004441165999992336, 0.0043076910000081625, 0.004353745000003073, 0.004350431000005983, 0.00441876900001148, 0.004513271000007535, 0.004555888999988156, 0.004612405000017361, 0.004375950999985889, 0.004375930000009021, 0.004419843000022183, 0.00442316999999548, 0.004396124999999529, 0.00472669800001313, 0.0044586809999884736, 0.004780447999991111, 0.005084728000014138, 0.004571443000003228, 0.004419403999975202, 0.0045697420000010425, 0.004774054999984401, 0.004524236999998266], "search_avg": 0.004521939300001918, "search_p50": 0.004441616500002965, "search_p95": 0.004820450050000602, "search_p99": 0.005250137320009571}, "sklearn": {"build_time": 0.004995567999998229, "build_memory_mb": 0.0, "search_avg": 0.009692892740000616, "search_p50": 0.008965658999997572}, "faiss": {"build_time": 0.015116928999987067, "build_memory_mb": 49.15234375, "search_avg": 0.003255458560000193, "search_p50": 0.003192307999981381}, "annoy": {"build_time": 0.9791252359999874, "build_memory_mb": 69.81640625, "search_avg": 4.324282000197854e-05, "search_p50": 4.215900000303918e-05}} -------------------------------------------------------------------------------- /benchmarks/ecf2f36e87daa1810344a92c6a626ca306f1d37d-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761353996.079428, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.052893960999995215, "build_memory_mb": 56.515625, "search_times": [0.004910277999982782, 0.004499448000018447, 0.0038363150000009227, 0.0038243099999988317, 0.0038137420000055045, 0.0037776340000164055, 0.003863125000009404, 0.003843879000015704, 0.003813825999998244, 0.003939337999980808, 0.003839610999989418, 0.003843216999996457, 0.00381660800002237, 0.0038193319999777486, 0.003799363000013045, 0.003838478999995232, 0.003842776999988473, 0.0038502410000091913, 0.003867001999992681, 0.003933167000013782, 0.004159030000010944, 0.004096752999998898, 0.004125630000004321, 0.004016312000004518, 0.0039541259999964495, 0.0038736950000100023, 0.00409646299999622, 0.004073790999996163, 0.00405495500001507, 0.004018486999996185, 0.004005101000018385, 0.004034106000005977, 0.004047520999989729, 0.00400576300000921, 0.003949237000000494, 0.003978571999994074, 0.004011934999994082, 0.003976316999995788, 0.004079791000009436, 0.00399952099999723, 0.004018045999998776, 0.00401899799999228, 0.003998698999993167, 0.003962250999990147, 0.004121289000011075, 0.003933316999990666, 0.003998358000018243, 0.004049003999995193, 0.003999320000019679, 0.004008667999983118], "search_avg": 0.003984734960001219, "search_p50": 0.003988465000006158, "search_p95": 0.004144000000007963, "search_p99": 0.004708971300000257}, "sklearn": {"build_time": 0.003747417999989011, "build_memory_mb": 0.0, "search_avg": 0.008002595720001863, "search_p50": 0.007415252000015471}, "faiss": {"build_time": 0.00787855600000853, "build_memory_mb": 49.234375, "search_avg": 0.002399814199999355, "search_p50": 0.002355743499990126}, "annoy": {"build_time": 1.0799656459999767, "build_memory_mb": 67.13671875, "search_avg": 4.7207820000494396e-05, "search_p50": 4.380250001645436e-05}} -------------------------------------------------------------------------------- /benchmarks/2e1def1d0abcb390018675276e35194f3d4a427f-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762736794.374386, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.050419217000012395, "build_memory_mb": 56.68359375, "search_times": [0.0065806899999643065, 0.0057530830000018796, 0.004663793000020178, 0.004722739999976966, 0.004716259000019818, 0.004757180000012795, 0.004635000000007494, 0.004742682999960834, 0.004679970999973193, 0.005061484000009386, 0.004744278000032409, 0.0045970639999950436, 0.004623479000031239, 0.00479409500002248, 0.004728451999994832, 0.004734167000037814, 0.004750983999997516, 0.00477846699999418, 0.00466051600000128, 0.0047731749999684325, 0.004740770000012162, 0.005609113000048183, 0.0047899140000140505, 0.004799749999961023, 0.00482249000003776, 0.004825964000019667, 0.0051048679999894375, 0.004813742000010279, 0.0049606829999788715, 0.004890501000033964, 0.004915411000013137, 0.005016656000009334, 0.004696120999994946, 0.0048563909999757016, 0.004726407000021027, 0.004869738000024881, 0.0048997430000099484, 0.004973827000014808, 0.004832784000029733, 0.004812624999999571, 0.004789981000044463, 0.005479568999987805, 0.0051292679999619395, 0.004831514999978026, 0.0047903349999955935, 0.004893321999986711, 0.004782155999976112, 0.004862496000043848, 0.00503369500000872, 0.004857647999983783], "search_avg": 0.004898100860003751, "search_p50": 0.004806187499980297, "search_p95": 0.005550818200021013, "search_p99": 0.006175162569982715}, "sklearn": {"build_time": 0.005034190000003491, "build_memory_mb": 0.0, "search_avg": 0.00960015853999721, "search_p50": 0.008936968000000434}, "faiss": {"build_time": 0.015525158000002648, "build_memory_mb": 49.40625, "search_avg": 0.003509563899997374, "search_p50": 0.0035002630000064983}, "annoy": {"build_time": 0.993395372000009, "build_memory_mb": 66.6953125, "search_avg": 4.782740000109698e-05, "search_p50": 4.512600003181433e-05}} -------------------------------------------------------------------------------- /benchmarks/4b31e23d003b9be8d9d4c71467061384a0e30713-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755894119.133831, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.0325489929999776, "build_memory_mb": 54.875, "search_times": [0.005138703999989502, 0.004549104999995279, 0.0040273930000012115, 0.004008517999977812, 0.00386540100001298, 0.0038419680000174594, 0.00386703400002375, 0.003860352000003786, 0.0038393519999999626, 0.0038930520000235447, 0.003939208999980792, 0.0041839840000079676, 0.004100849999986167, 0.004074520000017401, 0.0040098709999938364, 0.0040349169999842616, 0.0040338949999920715, 0.004022775000009915, 0.0040974739999910526, 0.00408792499999322, 0.0042616850000172235, 0.004275866000000406, 0.004354893999988008, 0.004037390999997115, 0.003907139000006055, 0.003886700999998993, 0.0038881230000242795, 0.0038330209999912768, 0.003910143000013022, 0.0038890849999972943, 0.003971589000002496, 0.0040389440000012655, 0.003953785999982529, 0.004196468000003506, 0.003933748999997988, 0.003920051999983798, 0.0038374189999785813, 0.003929821000014044, 0.0038999559999979283, 0.0039467100000081246, 0.00392880999999079, 0.003959345999987818, 0.003946291999994855, 0.0038724739999906888, 0.003862435999991476, 0.00382806100000721, 0.003901372000001402, 0.003951250999989497, 0.0041356650000068385, 0.004135974999996961], "search_avg": 0.004017410459999269, "search_p50": 0.003948980499998811, "search_p95": 0.004319331399993587, "search_p99": 0.004849800489992332}, "sklearn": {"build_time": 0.003731660999989117, "build_memory_mb": 0.0, "search_avg": 0.00862181526000029, "search_p50": 0.008077753499989626}, "faiss": {"build_time": 0.009256104000002097, "build_memory_mb": 49.35546875, "search_avg": 0.002475631280002517, "search_p50": 0.002463994999999386}, "annoy": {"build_time": 1.0966432049999923, "build_memory_mb": 66.390625, "search_avg": 4.9892979997707695e-05, "search_p50": 4.846000000213735e-05}} -------------------------------------------------------------------------------- /benchmarks/dfee4f913f4f0dede987b1e5034c0af998055289-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753082343.057127, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.029719065000023193, "build_memory_mb": 55.02734375, "search_times": [0.004939352999997482, 0.0044082820000141965, 0.003697284999987005, 0.003780728999998928, 0.003808270999996921, 0.0038830409999945914, 0.003914369999989731, 0.003897268000002896, 0.0039001030000065384, 0.0040127229999882275, 0.003924759000000222, 0.003974532000000863, 0.003926792999976669, 0.003929418000012674, 0.003975773999997045, 0.0039325729999859504, 0.003955044999997881, 0.0039574790000074245, 0.003975604000004296, 0.003963179999999511, 0.004036697999993066, 0.004034372999996094, 0.003988297000006469, 0.003993076000000428, 0.003989199999978155, 0.003792942999979232, 0.003868804000006776, 0.00378067999997711, 0.003914549000000989, 0.003927384000007805, 0.003912777000010692, 0.003962989999990896, 0.0039349980000054074, 0.004103091999979824, 0.003698245999999017, 0.003980251999990969, 0.004038040000011733, 0.004029174000010016, 0.004024974999992992, 0.003965614999998479, 0.003998435999989169, 0.004075449999987768, 0.004005941000002622, 0.0039671769999927164, 0.003971315999990566, 0.003966407000007166, 0.003969962999974541, 0.003993707999995877, 0.0040073430000120425, 0.003966386000001876], "search_avg": 0.003973097439996991, "search_p50": 0.003966396500004521, "search_p95": 0.004090653099983399, "search_p99": 0.004679128210005671}, "sklearn": {"build_time": 0.0033507569999926545, "build_memory_mb": 0.0, "search_avg": 0.009191217120000489, "search_p50": 0.008475607999997692}, "faiss": {"build_time": 0.008177090999993197, "build_memory_mb": 49.234375, "search_avg": 0.0023648656200009554, "search_p50": 0.002343541500010815}, "annoy": {"build_time": 1.1109603549999747, "build_memory_mb": 66.1484375, "search_avg": 5.368117999921651e-05, "search_p50": 5.3629999996474e-05}} -------------------------------------------------------------------------------- /benchmarks/e7faba3db786483189dab0b42fc98ab772369653-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764723925.566666, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05290052099999798, "build_memory_mb": 58.21484375, "search_times": [0.004821140999979434, 0.004490704999994932, 0.003828875000010612, 0.003891500999998243, 0.0037434350000182803, 0.003747975999999653, 0.0037149119999924096, 0.0038030460000015864, 0.004371754999993982, 0.005237873999988096, 0.004175709999998389, 0.0037688529999968523, 0.003747262999979739, 0.0037160640000024614, 0.003737814999993816, 0.0037391280000065308, 0.003736655000011524, 0.0038137640000002193, 0.003871433999989904, 0.0038873729999977513, 0.003795351999997365, 0.0038826649999919027, 0.003918561999995518, 0.003959577000017589, 0.003932988000002524, 0.003921275999999807, 0.003992748999991136, 0.003971809999995912, 0.004046199000015349, 0.003995653999993465, 0.003969546999996965, 0.004020119999978533, 0.003951511999986224, 0.003958254999986366, 0.004007657000016707, 0.0039830009999946014, 0.00401037200001042, 0.004114845999993122, 0.00383137899999042, 0.00385929299997656, 0.00407494200001679, 0.004036920999993754, 0.0040185970000266025, 0.004045687999990832, 0.0040212019999898985, 0.003984363000000712, 0.004005742999993345, 0.004016073000002507, 0.003961641000017835, 0.004000825000019859], "search_avg": 0.003982681759998741, "search_p50": 0.003960609000017712, "search_p95": 0.004437177499994505, "search_p99": 0.005033674829983851}, "sklearn": {"build_time": 0.0035678890000099273, "build_memory_mb": 0.0, "search_avg": 0.008011964220000323, "search_p50": 0.007147760000009384}, "faiss": {"build_time": 0.00793896200002564, "build_memory_mb": 49.2578125, "search_avg": 0.002322245599997359, "search_p50": 0.002312462499986623}, "annoy": {"build_time": 1.0614595950000023, "build_memory_mb": 67.234375, "search_avg": 4.687743999795657e-05, "search_p50": 4.5860000000175205e-05}} -------------------------------------------------------------------------------- /benchmarks/f4ff7246be7bdcff575367fec041cc8472a17a75-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765155967.992873, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05277645600000369, "build_memory_mb": 56.55859375, "search_times": [0.004864173000015626, 0.004594076000017822, 0.003793091999995113, 0.003920921000002409, 0.003713902999976426, 0.0037003280000078576, 0.003753357000022106, 0.0037542390000169235, 0.00373831999999652, 0.0037328489999879366, 0.0037730939999960356, 0.003810874999999214, 0.003741214999990916, 0.003759027999990394, 0.0038403509999795915, 0.00376198399999339, 0.003809843999988516, 0.0037596800000017083, 0.003852203000008103, 0.003853783000010935, 0.0038501189999919916, 0.004086854000007634, 0.004068940000024668, 0.004111660000006623, 0.004048611999991181, 0.00403214100001037, 0.004062527000002092, 0.003989149999995334, 0.004016481999997268, 0.00400555100000588, 0.003993667999992567, 0.004012574000000768, 0.004010512999997218, 0.0041610430000105225, 0.0040049099999919235, 0.003972297999979446, 0.0037578360000054545, 0.003838737999984687, 0.0038540169999805585, 0.0037889339999992444, 0.00378094900000292, 0.003771632000024283, 0.0038184590000014396, 0.0038443880000045283, 0.003826543999991827, 0.004064732000017557, 0.004100028000010525, 0.00406152599998677, 0.00382968099998493, 0.0038066070000013497], "search_avg": 0.003921968559999982, "search_p50": 0.00384725349999826, "search_p95": 0.004138820650008768, "search_p99": 0.004731825470016701}, "sklearn": {"build_time": 0.0032264779999877646, "build_memory_mb": 0.0, "search_avg": 0.007982864419998919, "search_p50": 0.007092646999993235}, "faiss": {"build_time": 0.007745733000007249, "build_memory_mb": 49.24609375, "search_avg": 0.002200376920001759, "search_p50": 0.002189376499984519}, "annoy": {"build_time": 1.054899507000016, "build_memory_mb": 67.25, "search_avg": 4.4481140001266795e-05, "search_p50": 4.349150000848567e-05}} -------------------------------------------------------------------------------- /benchmarks/6e531d66443427ed8ddecdcac56106bd3ca096fc-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755738069.367118, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03251246700000365, "build_memory_mb": 54.89453125, "search_times": [0.005267251999981681, 0.0047209909999992306, 0.004059511999997767, 0.004044410999995307, 0.004107406000002811, 0.003985851999999568, 0.004051443999998128, 0.004074247000005471, 0.004199694999982739, 0.004240578999997524, 0.004094705999989401, 0.004146302999998852, 0.00418246999998928, 0.004244857999992746, 0.004255677999992713, 0.004234146999976929, 0.004092993000000433, 0.004321049999987281, 0.00406920800000421, 0.0043752520000168715, 0.00416286099999752, 0.0041791040000020985, 0.004316220999982079, 0.0042019469999843295, 0.004133989999985488, 0.004088112999994564, 0.004227174000021705, 0.0039775859999906515, 0.004327973000016527, 0.004257311000003483, 0.004171442000000525, 0.004367717999997467, 0.004326942000005829, 0.004203700000005028, 0.0041541269999925134, 0.004076491000006399, 0.004022410000004584, 0.003940075000002707, 0.003920358000016222, 0.004013843999985056, 0.003950625000015862, 0.003974630000016077, 0.003921510000026274, 0.0039145650000023124, 0.003876384999983884, 0.0040337119999946935, 0.003946156000012024, 0.003958631000017476, 0.003924215000012055, 0.00390456900001368], "search_avg": 0.004144848779999961, "search_p50": 0.004101055999996106, "search_p95": 0.0043718617000081395, "search_p99": 0.0049995841099902795}, "sklearn": {"build_time": 0.0035585900000114634, "build_memory_mb": 0.0, "search_avg": 0.007864120480000451, "search_p50": 0.007199733500002026}, "faiss": {"build_time": 0.008761784999990141, "build_memory_mb": 49.2890625, "search_avg": 0.002435048119999692, "search_p50": 0.0024279119999874865}, "annoy": {"build_time": 1.0892560119999928, "build_memory_mb": 66.5390625, "search_avg": 4.883489999770063e-05, "search_p50": 4.8261000003435583e-05}} -------------------------------------------------------------------------------- /benchmarks/72b98c2e07b39f104aa023668aae6e661dab0204-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763514215.003095, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.052241524999999456, "build_memory_mb": 57.921875, "search_times": [0.00480939499999522, 0.00443243199998733, 0.0038406449999968117, 0.0037993789999859473, 0.0037298180000107095, 0.003801492000008011, 0.0037274539999998524, 0.0038551030000064657, 0.003789180000012493, 0.0037642829999811056, 0.00379775599998311, 0.003790301000009322, 0.0038211890000070525, 0.003817852999986826, 0.0037697129999969547, 0.003758411000006845, 0.003850583999991386, 0.0038597010000103182, 0.0038020140000014635, 0.0042541579999806345, 0.0038592800000003535, 0.003929120999998759, 0.0037962629999981345, 0.00378710500001489, 0.0038119419999986803, 0.0038269500000183143, 0.0038433809999958157, 0.004061557999989418, 0.004117774000008012, 0.004101853000008759, 0.004090423000008059, 0.004014710999996396, 0.0040632019999975455, 0.00399381199997606, 0.0040286370000046645, 0.004025842000004332, 0.00404272299999775, 0.004064955000018244, 0.004030811000006906, 0.003949720000008483, 0.004055637999982764, 0.004021644000005153, 0.004005062999993925, 0.003966560999998592, 0.003988861999999926, 0.003976399999999103, 0.003963615000003529, 0.004030189000019391, 0.0038714330000004793, 0.00379465000000323], "search_avg": 0.00394369958000027, "search_p50": 0.003900276999999619, "search_p95": 0.004192785199992954, "search_p99": 0.004624683129991353}, "sklearn": {"build_time": 0.003417184999989331, "build_memory_mb": 0.0, "search_avg": 0.00834852789999843, "search_p50": 0.007192888999995262}, "faiss": {"build_time": 0.008052614999996877, "build_memory_mb": 49.2421875, "search_avg": 0.0023028497000007063, "search_p50": 0.0022946819999987156}, "annoy": {"build_time": 1.051814377999989, "build_memory_mb": 67.76953125, "search_avg": 4.5606059999272474e-05, "search_p50": 4.45380000115847e-05}} -------------------------------------------------------------------------------- /benchmarks/86e246fcab13971ced3edee7cbf63656ddf57981-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763860334.495947, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05176991399991948, "build_memory_mb": 57.9765625, "search_times": [0.004760422000003928, 0.004400370000098519, 0.003780762000019422, 0.003799226999944949, 0.0037129860000959525, 0.003731690999984494, 0.003832909999914591, 0.00382256000000325, 0.003753532000018822, 0.003805408999937754, 0.0038041060000750804, 0.0038009400000191818, 0.0037580989999241865, 0.003826937999974689, 0.003780882000000929, 0.0037318219999633584, 0.0038297940000120434, 0.0037505459999920276, 0.0037422699999751785, 0.004020029000002978, 0.004014650999920377, 0.003776033000008283, 0.003933398000071975, 0.003958695000051193, 0.004004370000075141, 0.003995354000039697, 0.004010681999943699, 0.004026621999969393, 0.0040032979999296, 0.00400704499998028, 0.004041618999963248, 0.003964925999980551, 0.003977689999942413, 0.003971539000076518, 0.003999550999992607, 0.004018585999915558, 0.004083397000044897, 0.003943046000017603, 0.003952373000061016, 0.004026480999982596, 0.0040438639999820225, 0.004087094000055913, 0.003958064000016748, 0.004007635999982995, 0.003958494000016799, 0.003927645999965534, 0.004076725000004444, 0.004007586000057017, 0.0039744539999446715, 0.0039276769999787575], "search_avg": 0.003942477819998657, "search_p50": 0.003958594500033996, "search_p95": 0.004085430350050956, "search_p99": 0.004583996520050277}, "sklearn": {"build_time": 0.0034765840000545722, "build_memory_mb": 0.0, "search_avg": 0.008324869619996208, "search_p50": 0.007052012499968896}, "faiss": {"build_time": 0.007816430000048058, "build_memory_mb": 49.33984375, "search_avg": 0.0023024467000072944, "search_p50": 0.002282473499974458}, "annoy": {"build_time": 1.0581724730000133, "build_memory_mb": 67.6171875, "search_avg": 4.593661999933829e-05, "search_p50": 4.479400001855538e-05}} -------------------------------------------------------------------------------- /benchmarks/e98a8cde17129adeeb7cb657482bbab5a02a6d50-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753146562.683152, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.04328903500001502, "build_memory_mb": 54.97265625, "search_times": [0.00557077799999206, 0.0048240780000128325, 0.004052952000023424, 0.003987860000023602, 0.004238912999994682, 0.004136739999978545, 0.004167288000019198, 0.004086215000000948, 0.004120220000004338, 0.0040275540000038745, 0.004012405999986868, 0.004628359000008686, 0.003943796999976712, 0.003850711000012552, 0.003828830000003336, 0.003957169000017302, 0.0039299409999955515, 0.0038537969999765664, 0.0039022880000061377, 0.00395575900000722, 0.003877692000003208, 0.003934742000012648, 0.0038682839999921725, 0.0038928770000268287, 0.003893912000023647, 0.0038994129999991856, 0.0038902759999928094, 0.004242481000005682, 0.004113236999984338, 0.004140718000002153, 0.004100124000018468, 0.004141508999992993, 0.0040913750000015625, 0.00401389800001084, 0.004063502999997581, 0.004043745000018362, 0.004000783999998703, 0.004718760000002931, 0.005291430999989188, 0.0051526279999905, 0.005385778999993818, 0.005041688999995131, 0.004108306999995648, 0.004012606000003416, 0.004007507000011401, 0.004054966000012428, 0.004018016000003399, 0.004061188000008542, 0.004001044000006004, 0.004070084999995061], "search_avg": 0.004184164620002662, "search_p50": 0.004048348500020893, "search_p95": 0.005228969649989778, "search_p99": 0.005480128489992921}, "sklearn": {"build_time": 0.003297365999998192, "build_memory_mb": 0.0, "search_avg": 0.00905704400000161, "search_p50": 0.008404553500000134}, "faiss": {"build_time": 0.008131192999996983, "build_memory_mb": 49.36328125, "search_avg": 0.0023851512799978993, "search_p50": 0.0023373169999985066}, "annoy": {"build_time": 1.0727580470000078, "build_memory_mb": 70.01953125, "search_avg": 4.5722300001216354e-05, "search_p50": 4.522499999382035e-05}} -------------------------------------------------------------------------------- /benchmarks/0f5bdbfa52d258785bdb27e3752ef53ac2807421-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754442667.387003, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.031305836000001364, "build_memory_mb": 54.89453125, "search_times": [0.005200913999999557, 0.004709935999997583, 0.003977825000006874, 0.0040121489999904725, 0.003956274000003646, 0.0038965729999915766, 0.003922332000001916, 0.0038824869999984912, 0.0038838090000012926, 0.003845807999994122, 0.004116433999996616, 0.004080577999999946, 0.004100035000007551, 0.004067152000004626, 0.003853793000004657, 0.0038515090000004193, 0.003844556000004218, 0.0038511180000000422, 0.0038576000000034583, 0.003821302000005744, 0.003870513999999048, 0.003905298999995921, 0.003855666999996288, 0.0038345469999967463, 0.0038907929999965063, 0.0038738309999928333, 0.0039704020000073115, 0.003879290000000424, 0.003867588999995064, 0.003910949999990976, 0.003921730000001844, 0.0039476989999940315, 0.003869112000003838, 0.003856889000005026, 0.003944312999990984, 0.003836912000011239, 0.0038770260000120516, 0.003868009999990818, 0.003892123999989394, 0.00394994299999496, 0.003920627999988824, 0.003927790999995295, 0.003945145000002981, 0.0038606760000021723, 0.0038512190000119517, 0.0039471680000104925, 0.004033118999998919, 0.003979307999998127, 0.003918374000008384, 0.00389461000000324], "search_avg": 0.00395665723999997, "search_p50": 0.0038955914999974084, "search_p95": 0.004109054450001537, "search_p99": 0.0049603347799985886}, "sklearn": {"build_time": 0.0035212009999980864, "build_memory_mb": 0.0, "search_avg": 0.007899940920000006, "search_p50": 0.007090230999999392}, "faiss": {"build_time": 0.0079208660000063, "build_memory_mb": 49.4140625, "search_avg": 0.0023822907200005262, "search_p50": 0.002394496500002674}, "annoy": {"build_time": 1.087368619000003, "build_memory_mb": 66.16796875, "search_avg": 4.638378000066723e-05, "search_p50": 4.550450000095907e-05}} -------------------------------------------------------------------------------- /benchmarks/20d4993e7c4b074bfb5ef83c52dee51c7cdd91f1-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755806528.571572, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03190044500001932, "build_memory_mb": 55.01953125, "search_times": [0.005324842999982593, 0.004758954999999787, 0.003931598000008307, 0.003847311000015452, 0.004089512999996714, 0.004156728999987536, 0.0039489410000044245, 0.00391640000000848, 0.0038438540000242938, 0.004131522000022869, 0.0040635049999764306, 0.004087188999989166, 0.004074154999983648, 0.004042304999984481, 0.004155446999988044, 0.0040804980000075375, 0.0040630449999810025, 0.0040433979999932035, 0.003954350999975986, 0.003958830000016178, 0.003908365000000913, 0.0038855030000206625, 0.004015135000003056, 0.0038837189999867405, 0.004151368999998795, 0.003975340000010874, 0.0040664509999999154, 0.004056261000016548, 0.00400948399999379, 0.004045731999980262, 0.004020805999999766, 0.003908666000000949, 0.00398451700002056, 0.003970831999993152, 0.003992963000001737, 0.003928693000005978, 0.003927551000003859, 0.004022047000006523, 0.003994777000002614, 0.0039027640000028896, 0.004193297000000484, 0.0040462630000206445, 0.004130940999999666, 0.0041183669999895756, 0.0042146670000136055, 0.004455888999984836, 0.004089854000000059, 0.004089143000015838, 0.0040296219999902405, 0.004039239999997335], "search_avg": 0.00407061294000016, "search_p50": 0.004040772499990908, "search_p95": 0.004347339099997781, "search_p99": 0.005047557879991017}, "sklearn": {"build_time": 0.0034506500000190954, "build_memory_mb": 0.0, "search_avg": 0.008782666059999542, "search_p50": 0.008275983499999029}, "faiss": {"build_time": 0.008573593999983586, "build_memory_mb": 49.2265625, "search_avg": 0.0022866857400003935, "search_p50": 0.0022733490000064194}, "annoy": {"build_time": 1.0697402150000244, "build_memory_mb": 67.08203125, "search_avg": 4.66511599995556e-05, "search_p50": 4.5689999979003915e-05}} -------------------------------------------------------------------------------- /benchmarks/47f824975f2d14b7d78c81aa87468fdb6783aed6-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755565421.266109, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.03162544599999251, "build_memory_mb": 55.125, "search_times": [0.005062518000002569, 0.004564939999994522, 0.0038347190000109777, 0.0038242390000107207, 0.0038190799999995306, 0.0038079890000091154, 0.0045556829999924275, 0.0038681540000027326, 0.003858563999997955, 0.003813970999999583, 0.003906753999999069, 0.0041761360000123204, 0.0041379040000038, 0.004102127999999539, 0.004073805000004427, 0.004039821999995752, 0.00408698900000104, 0.004047044999992977, 0.0040441900000018904, 0.00399735300000259, 0.0040563719999937575, 0.003980491000007191, 0.003986522000005266, 0.00405005000000358, 0.0038778990000025715, 0.003816626000002543, 0.0038680720000030533, 0.0038325049999912153, 0.0038461000000040713, 0.0038263900000004014, 0.003930280000005837, 0.003860775000006811, 0.0038318870000040306, 0.0037973280000045406, 0.0038094319999970594, 0.0039583399999969515, 0.004237019000001396, 0.004106035000006614, 0.0040719010000032085, 0.004076640000008069, 0.0038678300000043464, 0.0038386660000071515, 0.003841792000002897, 0.003910379999993552, 0.003921429999991233, 0.0038384459999889486, 0.0038649350000099503, 0.003859155000000669, 0.003843244999998774, 0.003847152000005849], "search_avg": 0.003981513560001701, "search_p50": 0.00389232650000082, "search_p95": 0.004412284199996463, "search_p99": 0.004818704779998625}, "sklearn": {"build_time": 0.0034582370000038054, "build_memory_mb": 0.0, "search_avg": 0.009059977060001358, "search_p50": 0.008551467000003754}, "faiss": {"build_time": 0.007880751999991276, "build_memory_mb": 49.45703125, "search_avg": 0.0022876630600001135, "search_p50": 0.002281072999998912}, "annoy": {"build_time": 1.0708816779999921, "build_memory_mb": 69.87109375, "search_avg": 4.605297999916047e-05, "search_p50": 4.62265000038542e-05}} -------------------------------------------------------------------------------- /benchmarks/7cec1e63b23bc09f416b090d2ae1abf468722a56-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763341505.078117, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05344216700001425, "build_memory_mb": 57.97265625, "search_times": [0.005026790999977493, 0.00462380999999823, 0.003855858999997963, 0.003860086000031515, 0.003807698999992226, 0.0038371640000036678, 0.0038529230000108328, 0.0038855740000371952, 0.0038811759999930473, 0.003845308999984809, 0.003947530000004917, 0.003837413999974615, 0.0038291889999868545, 0.0037814499999626605, 0.003942720999987159, 0.0038984579999805646, 0.0037789659999702963, 0.00386578699999518, 0.0038798329999849557, 0.003902226000036535, 0.0038849720000371235, 0.0037954869999907714, 0.0038447279999900275, 0.003907925999953932, 0.0038686329999677582, 0.003841571999998905, 0.003886034999993626, 0.003949162999958844, 0.004071170000031543, 0.003979138999966381, 0.004037727999957497, 0.004022378999991361, 0.004059809000011683, 0.003920480000033422, 0.004168881999987661, 0.003919327999994948, 0.00413963800002648, 0.004094284000018433, 0.00407067899999447, 0.004100504999996701, 0.004007462000004125, 0.00404861799995615, 0.004411585000013929, 0.003898148000018864, 0.0040030830000432616, 0.003938773000015772, 0.003997312999956648, 0.003968799000006129, 0.0039983640000400555, 0.0039792990000364625], "search_avg": 0.003979078919998074, "search_p50": 0.003919904000014185, "search_p95": 0.004302368650002108, "search_p99": 0.004829330309987653}, "sklearn": {"build_time": 0.003430345000026591, "build_memory_mb": 0.125, "search_avg": 0.008865485100000115, "search_p50": 0.007237693999996964}, "faiss": {"build_time": 0.009088124000015796, "build_memory_mb": 49.23828125, "search_avg": 0.002385814519998348, "search_p50": 0.0023792560000117646}, "annoy": {"build_time": 1.0644780540000056, "build_memory_mb": 67.1796875, "search_avg": 4.857229999970514e-05, "search_p50": 4.654700001083256e-05}} -------------------------------------------------------------------------------- /benchmarks/a7152227cba2c228c81447725e1dab87e6725a3e-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764551784.099216, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05184741200000076, "build_memory_mb": 58.09375, "search_times": [0.0047671680000007655, 0.00437790300000529, 0.0037484309999911147, 0.003676757000022235, 0.003783615999992662, 0.003756736000013916, 0.003712062999994714, 0.003749271999993198, 0.0037462159999961386, 0.0037573980000047413, 0.0037656829999832553, 0.0037453550000066116, 0.0038569820000020627, 0.0037634480000008352, 0.0037804999999764277, 0.0038287300000092728, 0.0038633340000160388, 0.0037715439999885803, 0.00398891800000456, 0.0040137350000009064, 0.0038270260000103917, 0.003817178000019794, 0.003763028000008717, 0.0037731310000026497, 0.003911143999999922, 0.004284568000002764, 0.0038122699999973975, 0.003810506000007763, 0.0038974080000002687, 0.00386884499999951, 0.003999407000009114, 0.0038302930000213564, 0.003931902000005039, 0.003805677000002561, 0.0038020100000153434, 0.0038018099999987953, 0.003829340999999431, 0.003806668999999374, 0.003794815999981438, 0.003830152999995562, 0.003851873000002115, 0.003821587000004456, 0.0038633540000034827, 0.004026277999997774, 0.004127436000004536, 0.004091639999984409, 0.003993385999990551, 0.0039967219999823556, 0.004055221999976766, 0.004236909999974614], "search_avg": 0.0038943075800000316, "search_p50": 0.0038278780000098322, "search_p95": 0.004263121899990096, "search_p99": 0.004576428150002982}, "sklearn": {"build_time": 0.0033164759999806392, "build_memory_mb": 0.0, "search_avg": 0.007679996659999233, "search_p50": 0.006834322000003112}, "faiss": {"build_time": 0.007729683999997405, "build_memory_mb": 49.39453125, "search_avg": 0.002220513919997984, "search_p50": 0.002207044999991581}, "annoy": {"build_time": 1.0406612879999955, "build_memory_mb": 67.1875, "search_avg": 4.5474059999151e-05, "search_p50": 4.46780000089575e-05}} -------------------------------------------------------------------------------- /benchmarks/aa406866a95565d39f3632654a659c07465c6cc9-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764032606.401716, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.051743294999994305, "build_memory_mb": 57.9375, "search_times": [0.0048367320000011205, 0.004497465000014245, 0.0037903180000000702, 0.0037524450000034903, 0.003794206000009126, 0.0038524949999896307, 0.003824553000015385, 0.0038597089999825585, 0.0037955089999854863, 0.003802751999984366, 0.0037812010000095597, 0.003867424000020492, 0.003794216000017059, 0.0038208859999997458, 0.0037613540000052126, 0.003847254999982397, 0.0037991449999879023, 0.0038012789999868346, 0.003793445000013662, 0.0037913330000094447, 0.003816537999995262, 0.004779585000022735, 0.0038753479999797946, 0.0038246930000127577, 0.003840002000004006, 0.0037609240000051614, 0.0038787950000198634, 0.003816838999995298, 0.003784808999995448, 0.004117102000009254, 0.0038894650000145248, 0.004138992999997981, 0.003879877000002807, 0.004117152000020496, 0.004094138999988672, 0.004060074000022951, 0.004027633999982072, 0.004019338000006201, 0.004046960000010813, 0.004021382000019003, 0.004002517000003536, 0.003975295999993023, 0.004023186000011947, 0.004050487000000658, 0.004073138999984849, 0.0039857050000193794, 0.003986926999999696, 0.004003138000001627, 0.0040555660000052285, 0.0039367729999923995], "search_avg": 0.0039549221000027045, "search_p50": 0.003877071499999829, "search_p95": 0.0043361526000069255, "search_p99": 0.004808729970011711}, "sklearn": {"build_time": 0.0034131410000100004, "build_memory_mb": 0.0, "search_avg": 0.008090426899998988, "search_p50": 0.0071379169999943315}, "faiss": {"build_time": 0.007926977000010993, "build_memory_mb": 49.234375, "search_avg": 0.002265779859999384, "search_p50": 0.002259567499990567}, "annoy": {"build_time": 1.0765636779999852, "build_memory_mb": 67.4375, "search_avg": 4.7030920001702725e-05, "search_p50": 4.527549999977509e-05}} -------------------------------------------------------------------------------- /benchmarks/d8b47db1e7ba2c4c1ef7afcd9a28bdc2c1e01de8-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761786260.815577, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05101754300000039, "build_memory_mb": 57.9609375, "search_times": [0.005101800999966599, 0.004499973000008595, 0.003784716000041044, 0.00369887499999777, 0.0037666119999926195, 0.003775569000026735, 0.003754159000038726, 0.0037811089999877368, 0.0037397020000184966, 0.0037194939999949383, 0.0037282399999867266, 0.0037659310000321966, 0.0037731749999920794, 0.003774066000005405, 0.0038106409999727475, 0.0038058360000263747, 0.0038034799999877578, 0.0038453009999557253, 0.0037957339999934447, 0.0038298810000014782, 0.003876691000016308, 0.003840960999980325, 0.004248743000005106, 0.004085939000049166, 0.003982315999962793, 0.0039958410000053846, 0.004026548000013008, 0.00397594300000037, 0.004011711000032392, 0.00408079899995073, 0.004047908000018197, 0.0039961909999988166, 0.004170756999997138, 0.003987024000025485, 0.003987595000012334, 0.003995208999981514, 0.004086340000014843, 0.003912494999951832, 0.003793282000003728, 0.0038452789999610104, 0.003873462000001382, 0.0038821879999773046, 0.003802306000011413, 0.003838806999965527, 0.003874637000023995, 0.003944394999962242, 0.004018743000017366, 0.0041343089999941185, 0.0041900140000166175, 0.003929076000019904], "search_avg": 0.003939796079999951, "search_p50": 0.0038756640000201514, "search_p95": 0.004222314950010286, "search_p99": 0.004806905279987176}, "sklearn": {"build_time": 0.004048509000028844, "build_memory_mb": 0.0, "search_avg": 0.009293250259999013, "search_p50": 0.008476752999996506}, "faiss": {"build_time": 0.008292053000047872, "build_memory_mb": 49.24609375, "search_avg": 0.002580740540000761, "search_p50": 0.0025594499999783693}, "annoy": {"build_time": 1.110775220999983, "build_memory_mb": 66.83203125, "search_avg": 4.481230000124015e-05, "search_p50": 4.369100003032145e-05}} -------------------------------------------------------------------------------- /benchmarks/e995873161b595158a50fe8bc5d14e5f1f870a46-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762995921.654877, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05260864100000617, "build_memory_mb": 56.625, "search_times": [0.004897583999991184, 0.004559583000002476, 0.003814723999994385, 0.0038744160000021566, 0.0038156329999878835, 0.004077725000001919, 0.0038905060000047342, 0.003824782999998888, 0.004012361999997438, 0.003889222999987396, 0.0038640369999995983, 0.0038616520000118726, 0.0037700310000161608, 0.003799205999996502, 0.003800477999988061, 0.0037797290000014527, 0.003810747000017045, 0.003920462000024827, 0.003846865000014077, 0.003907708000014054, 0.0038319269999931294, 0.0038501899999801026, 0.003837446999995109, 0.00393202299997597, 0.003845060999992711, 0.003836084999988998, 0.003839050000010502, 0.0038834730000019135, 0.004106016999998019, 0.004088665000011815, 0.004037019000008968, 0.00401942599998506, 0.004143867000010459, 0.00400005000000192, 0.004098022999983186, 0.0039253710000082265, 0.003951370000010002, 0.003941220000001522, 0.003969904000001634, 0.003996424000007437, 0.003971245999991879, 0.004002353999993602, 0.004066975000000639, 0.0038509229999874606, 0.003834170000004633, 0.0038743160000080934, 0.0038027829999975893, 0.0038829920000011953, 0.003849740000021029, 0.0037696409999909974], "search_avg": 0.003941104120000319, "search_p50": 0.0038832325000015544, "search_p95": 0.004126834500004861, "search_p99": 0.004731963509996716}, "sklearn": {"build_time": 0.0034146190000114984, "build_memory_mb": 0.0, "search_avg": 0.007425026040000944, "search_p50": 0.0068552925000062714}, "faiss": {"build_time": 0.00851397700000689, "build_memory_mb": 49.41796875, "search_avg": 0.0023119259599985753, "search_p50": 0.0022769305000025497}, "annoy": {"build_time": 1.0551849459999971, "build_memory_mb": 67.60546875, "search_avg": 4.731849999757287e-05, "search_p50": 4.643149999594698e-05}} -------------------------------------------------------------------------------- /benchmarks/0a5d73ad49100c494d767f3f6eba5a5ab993aacd-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1760784536.606861, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.051066966000007596, "build_memory_mb": 57.99609375, "search_times": [0.00463723799998661, 0.004349981000018488, 0.003714532000003601, 0.0037372939999613664, 0.0038190469999790366, 0.0037721109999893088, 0.0038645500000029642, 0.003802846999974463, 0.0037788920000139115, 0.0038467890000219995, 0.0037395179999748507, 0.0037649050000254647, 0.003765707000070506, 0.0037690740000471123, 0.0038203800000928823, 0.003875282000080915, 0.003761779999990722, 0.003791886000044542, 0.0037914950000867975, 0.003742022999972505, 0.0038367500000049404, 0.004018138999981602, 0.004037284999981239, 0.004058455000063077, 0.004022917999918718, 0.0038452159999451396, 0.003786566000030689, 0.0037981579999950554, 0.003899296999975377, 0.003818995999949948, 0.0038138280000339364, 0.003813307000086752, 0.003789392000044245, 0.003825790000064444, 0.003815680999991855, 0.0038058430000091903, 0.0037911470000153713, 0.003819507999992311, 0.003847780999990391, 0.0038178639999841835, 0.003864932999931625, 0.0037533239999447687, 0.0038036580000380127, 0.0038127530000338083, 0.0037808859999586275, 0.003778190999923936, 0.003793228000063209, 0.0037935489999654237, 0.0038153000000420434, 0.0037971760000345967], "search_avg": 0.003848005000006651, "search_p50": 0.0038092980000214993, "search_p95": 0.00404892850002625, "search_p99": 0.004496482070002229}, "sklearn": {"build_time": 0.003205197999932352, "build_memory_mb": 0.0, "search_avg": 0.007714809040001, "search_p50": 0.007060678000016196}, "faiss": {"build_time": 0.006371433000026627, "build_memory_mb": 49.296875, "search_avg": 0.0021562720400106626, "search_p50": 0.002156771500040122}, "annoy": {"build_time": 1.1687155800000255, "build_memory_mb": 70.66015625, "search_avg": 4.617223999048292e-05, "search_p50": 4.59560000649617e-05}} -------------------------------------------------------------------------------- /benchmarks/2e3d314ec7ef1b6d13463e81247155772e225823-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762218235.667824, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.051614598000014666, "build_memory_mb": 56.625, "search_times": [0.004858653000013646, 0.004552665000005618, 0.003823424999978897, 0.0037804859999823748, 0.00378596499999162, 0.0038363799999956427, 0.00385298199998374, 0.0038059629999906974, 0.00385854000001018, 0.0037895319999847743, 0.00378333099999395, 0.003850055000015118, 0.003796004000008679, 0.0037868070000115495, 0.003788439999993898, 0.003935964999982389, 0.004091933999973207, 0.0040548270000044795, 0.004069072999982382, 0.004099489999987327, 0.0040344589999961045, 0.004019089999985681, 0.004106812999992826, 0.00403362700001253, 0.0037882500000137043, 0.0037930789999904846, 0.003847511999993003, 0.0037799639999889223, 0.0038021260000107304, 0.003773652999996102, 0.0038368699999864475, 0.0039212670000097205, 0.004113366000012775, 0.004099099000001161, 0.004064114000016161, 0.0038096000000109598, 0.003832723000016358, 0.0038194359999863536, 0.0038208710000162682, 0.0037825990000044385, 0.0038006130000098892, 0.0037874479999970845, 0.0038491329999885693, 0.003857698999979675, 0.0038269519999971635, 0.003818304999981592, 0.0038550440000051367, 0.0039059189999761657, 0.004089700999998058, 0.0040665589999946405], "search_avg": 0.003922728159997177, "search_p50": 0.0038421909999897252, "search_p95": 0.0041104171500037975, "search_p99": 0.0047087188800097116}, "sklearn": {"build_time": 0.0033639800000173636, "build_memory_mb": 0.0, "search_avg": 0.007730219919996557, "search_p50": 0.007029375000001892}, "faiss": {"build_time": 0.007585816000016621, "build_memory_mb": 49.359375, "search_avg": 0.0021903927999989037, "search_p50": 0.002174973499990074}, "annoy": {"build_time": 1.0721376509999914, "build_memory_mb": 70.3046875, "search_avg": 4.6180860000504257e-05, "search_p50": 4.49080000066715e-05}} -------------------------------------------------------------------------------- /benchmarks/4debfc8f2ffb3d43f193f38615f846aa4373edbc-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763168548.763682, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.0541216400000053, "build_memory_mb": 57.91796875, "search_times": [0.004762289000012743, 0.0044423930000050404, 0.0037619080000013128, 0.0037504869999906987, 0.0037022569999862753, 0.0037628089999941494, 0.0037836789999801113, 0.0037759439999831557, 0.003777216999992561, 0.003755917000006548, 0.003809273999991092, 0.0037978649999956815, 0.0037526899999988927, 0.003731902999987824, 0.003792435000008254, 0.0037557560000038848, 0.0037601749999964795, 0.003764902999989772, 0.0038539009999851714, 0.0037784089999775006, 0.0037889159999906497, 0.003937616999991178, 0.004524275999983729, 0.004004378999979963, 0.00404380200001242, 0.003982989000007819, 0.004005681999984745, 0.004004879999996547, 0.003923779000018612, 0.003878434999990077, 0.003775493000006236, 0.0038284219999979996, 0.003865910999991229, 0.0038098469999852114, 0.003794026999997868, 0.0038195950000101675, 0.003804827999999816, 0.0038744969999982004, 0.0038830029999985527, 0.0037458980000053543, 0.003732423000002427, 0.0037445750000131284, 0.003792073999989043, 0.003856823999996095, 0.003762489000024516, 0.003789138999991337, 0.003793795000007094, 0.0038663619999965704, 0.00382980699998825, 0.0037786489999973583], "search_avg": 0.003866292479996787, "search_p50": 0.003793911000002481, "search_p95": 0.00426302705000836, "search_p99": 0.004645662629998526}, "sklearn": {"build_time": 0.00342469100002063, "build_memory_mb": 0.0, "search_avg": 0.007853706000000784, "search_p50": 0.007126584000005209}, "faiss": {"build_time": 0.008314829999989115, "build_memory_mb": 49.3671875, "search_avg": 0.002336909680001327, "search_p50": 0.0022926955000173166}, "annoy": {"build_time": 1.0703651230000162, "build_memory_mb": 69.28515625, "search_avg": 4.661392000116393e-05, "search_p50": 4.583949998959724e-05}} -------------------------------------------------------------------------------- /benchmarks/55a1ddf0279df0856464a065aa1d5706eb9f3153-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765415281.593901, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05308466200000339, "build_memory_mb": 56.50390625, "search_times": [0.0048413330000016686, 0.004512398999992229, 0.0037931690000050367, 0.003818927000025951, 0.0037854529999776787, 0.0038316499999950793, 0.0037623430000053304, 0.0038670769999953336, 0.0037672699999973247, 0.0038192979999962517, 0.0038452029999973547, 0.003852258999984315, 0.003849174000009725, 0.003827542999999878, 0.003824457000007442, 0.003795432999993409, 0.0038166629999807355, 0.0038952599999788617, 0.003777659000007816, 0.003957790000015393, 0.0037690839999982018, 0.0038484719999871686, 0.003816322000005812, 0.0038050409999925705, 0.003839029000005212, 0.00392039799999111, 0.003865213000011636, 0.0037841520000085893, 0.004044160000006514, 0.00415814300001216, 0.004065670000017008, 0.0038359990000174093, 0.003821901999998545, 0.00380953900000236, 0.0038000920000058613, 0.0038222930000131328, 0.0038235359999987395, 0.003908564999989039, 0.0037928270000122666, 0.0038469190000114395, 0.0038391949999834196, 0.003840177000000722, 0.004014224000002287, 0.003978165000006584, 0.003940885000019989, 0.004113799999998946, 0.004030985000014198, 0.003956945999988193, 0.003950183000000607, 0.0040668320000065705], "search_avg": 0.003906982160001462, "search_p50": 0.0038396859999920707, "search_p95": 0.004138188650006214, "search_p99": 0.004680155339997043}, "sklearn": {"build_time": 0.003584266000018488, "build_memory_mb": 0.0, "search_avg": 0.00814244148000114, "search_p50": 0.007177750500005686}, "faiss": {"build_time": 0.008276902999995173, "build_memory_mb": 49.23828125, "search_avg": 0.0023016689399992176, "search_p50": 0.0022870774999859123}, "annoy": {"build_time": 1.0453483329999926, "build_memory_mb": 69.4921875, "search_avg": 4.571348000240505e-05, "search_p50": 4.512950000901128e-05}} -------------------------------------------------------------------------------- /benchmarks/6461fa5c425e46424ee1163fbfbec8d77f23e607-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761959215.828688, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.053154365000011694, "build_memory_mb": 57.8359375, "search_times": [0.00518028599998388, 0.004596202000016092, 0.00400476400000116, 0.003884959999993498, 0.0038939469999945686, 0.0037974480000002586, 0.0038548830000024736, 0.0038726569999880667, 0.003884678999980906, 0.0038714639999852807, 0.003900044999994634, 0.0038644709999857696, 0.0038462600000173097, 0.003860574000015049, 0.00390916499998184, 0.0038725569999940035, 0.00385895099998379, 0.003835917999992944, 0.0038589279999996506, 0.0038067829999874903, 0.003792826999983845, 0.0037490349999984574, 0.003868200999988858, 0.00387522099998705, 0.003854852999978675, 0.0038381820000097377, 0.0037674190000132057, 0.0037981939999838232, 0.003797535000018115, 0.0038163939999833474, 0.0037601459999905273, 0.003787934000001769, 0.0038287440000033257, 0.0038036869999871215, 0.0038000010000018847, 0.0038110710000012205, 0.004023429000000078, 0.00399880299997335, 0.004010614999998552, 0.004127045999979373, 0.003898845999998457, 0.003934992999973019, 0.003847869999987097, 0.003819035999981679, 0.0038940470000170535, 0.003874379999984967, 0.003847629999995661, 0.003838443000006464, 0.0037856029999829843, 0.003776064999982509], "search_avg": 0.0039016238399938175, "search_p50": 0.003856905500001062, "search_p95": 0.00408041834998869, "search_p99": 0.004894084839999663}, "sklearn": {"build_time": 0.0036327980000123716, "build_memory_mb": 0.0, "search_avg": 0.007980337839999834, "search_p50": 0.007154430499994646}, "faiss": {"build_time": 0.008779070000002775, "build_memory_mb": 49.23828125, "search_avg": 0.0027404054400000178, "search_p50": 0.0027220855000109623}, "annoy": {"build_time": 1.0808809979999978, "build_memory_mb": 67.73046875, "search_avg": 4.7799220000683816e-05, "search_p50": 4.7223000009921634e-05}} -------------------------------------------------------------------------------- /benchmarks/8694df386805a778b7bd503460cdd62b4a13e396-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763239506.433502, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.051839555000015025, "build_memory_mb": 56.890625, "search_times": [0.004843276000002561, 0.004536123000008274, 0.0037884479999945597, 0.0037797120000107043, 0.003718647999988889, 0.0037336860000038996, 0.0037399880000066332, 0.003903120999979137, 0.0037645440000062536, 0.003789549999993369, 0.0038120520000006763, 0.003876091000023507, 0.003793467000008377, 0.003814156000004232, 0.0038097870000228795, 0.0038653219999957855, 0.003814527000002954, 0.0037559769999973014, 0.0037953199999947174, 0.003837560000022222, 0.003908150999990312, 0.0041153479999991305, 0.004054985000010447, 0.004074040999995532, 0.004030188999990969, 0.0039945129999807705, 0.004052369999982375, 0.004038603999987345, 0.004008347999985062, 0.004134913999990886, 0.0040807830000062495, 0.004037061000019548, 0.003970919000011008, 0.0039462819999869225, 0.004136617000000342, 0.003864399000008234, 0.0038398040000231504, 0.00380845600000157, 0.003815578999990521, 0.003862144999999373, 0.0038079140000206735, 0.0038023429999896052, 0.003938128000015695, 0.004091954000017495, 0.003956281000000672, 0.003976588999989872, 0.003964487000018835, 0.004039116000001286, 0.003996575999991592, 0.004016442999983383], "search_avg": 0.003942693880001116, "search_p50": 0.0039056359999847245, "search_p95": 0.004135850649996086, "search_p99": 0.004692771030005359}, "sklearn": {"build_time": 0.0033952100000078644, "build_memory_mb": 0.0, "search_avg": 0.00786046575999876, "search_p50": 0.007180427999998074}, "faiss": {"build_time": 0.007962456000001339, "build_memory_mb": 49.3671875, "search_avg": 0.0022611836199973824, "search_p50": 0.0022677384999951755}, "annoy": {"build_time": 1.0422434460000147, "build_memory_mb": 70.16015625, "search_avg": 4.5295859997622756e-05, "search_p50": 4.459749999341511e-05}} -------------------------------------------------------------------------------- /benchmarks/b297b44fb277d5755bf5eea00d551ed723034e55-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765933447.554688, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05241512399993553, "build_memory_mb": 58.0546875, "search_times": [0.0047762390000798405, 0.0044061469999405745, 0.0037627140000040527, 0.0036665940000375485, 0.0037978599999632934, 0.0036856299999499242, 0.003683105000050091, 0.0036791179999227097, 0.00371200899996893, 0.003723459999946499, 0.0036945169999853533, 0.0036467869999796676, 0.0036906589999716743, 0.0037277979999998934, 0.0036844980000978467, 0.003752746000031948, 0.003722648999996636, 0.003660152000065864, 0.003664089000039894, 0.003686330999926213, 0.0040498240000488295, 0.004026166000016929, 0.003954191999923751, 0.003971484000089731, 0.003984749000096599, 0.003967167000041627, 0.003972122000050149, 0.004026447000001099, 0.00451088299996627, 0.003989420999914728, 0.0036877040000717898, 0.003753537000079632, 0.0036885750000692497, 0.003685419000021284, 0.0036667539999371, 0.0038045419998979924, 0.003907894999997552, 0.003851929999996173, 0.0038454080000747126, 0.003993004999983896, 0.0039171829999986585, 0.004038027999968108, 0.003642399000000296, 0.004000287999929242, 0.003951896999978999, 0.004010407000009764, 0.003978136999990056, 0.003990840000028584, 0.003994647000013174, 0.0037044050000076822], "search_avg": 0.0038677711400032424, "search_p50": 0.003801200999930643, "search_p95": 0.0042458016499892885, "search_p99": 0.00464621456002419}, "sklearn": {"build_time": 0.003552630999934081, "build_memory_mb": 0.0, "search_avg": 0.007917349220006144, "search_p50": 0.0071601249999844185}, "faiss": {"build_time": 0.008033918000023732, "build_memory_mb": 49.23828125, "search_avg": 0.0022808684199867456, "search_p50": 0.0022757444999683685}, "annoy": {"build_time": 1.0682950050000954, "build_memory_mb": 69.57421875, "search_avg": 4.85230999970554e-05, "search_p50": 4.841049997139635e-05}} -------------------------------------------------------------------------------- /benchmarks/d56c3b90dc65591c4c42113db0c247496c19ba2f-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762477448.805543, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05272842899998409, "build_memory_mb": 57.67578125, "search_times": [0.004786720999987892, 0.004534208999984912, 0.003785593000003473, 0.0037332050000031813, 0.0036883209999984956, 0.0037437539999984892, 0.0037518999999974767, 0.003760877000019036, 0.0038045179999812717, 0.0037857930000200213, 0.003775273000002244, 0.003883955999981481, 0.003784711000008656, 0.003784620999994104, 0.0037892699999986235, 0.003783239000000549, 0.0037518999999974767, 0.0037970239999935984, 0.003820017000009557, 0.003772668000010526, 0.003826889999999139, 0.0038217499999859683, 0.0037808239999890247, 0.0038787360000185345, 0.0038153590000149507, 0.003829585000005409, 0.0037772270000004937, 0.003820227000005616, 0.003831308000002309, 0.0038236240000060207, 0.003768702000002122, 0.0037958819999914795, 0.00400410100002091, 0.003926334999988512, 0.003939459999998007, 0.003955779999984088, 0.004027464000017744, 0.003998029999991104, 0.004242705000024216, 0.003942696000024171, 0.003951582000013332, 0.00391682800000126, 0.003987800000004427, 0.004071908000014446, 0.003988109999994549, 0.0040094500000122935, 0.003960760000012442, 0.003980706999982431, 0.0038154890000043906, 0.0038047680000090622], "search_avg": 0.0038922331400021905, "search_p50": 0.003820988499995792, "search_p95": 0.004165846350019819, "search_p99": 0.004662990119986432}, "sklearn": {"build_time": 0.003409962000006317, "build_memory_mb": 0.0, "search_avg": 0.007691350259999012, "search_p50": 0.006736132500009262}, "faiss": {"build_time": 0.007845306999996637, "build_memory_mb": 49.25390625, "search_avg": 0.0022759726800006775, "search_p50": 0.0022672249999970973}, "annoy": {"build_time": 1.0646268129999896, "build_memory_mb": 70.08984375, "search_avg": 4.9255680000328536e-05, "search_p50": 4.75090000122691e-05}} -------------------------------------------------------------------------------- /benchmarks/f13e48f8498232cd8c4ec140df83b5d1fd9d1bac-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763255275.161779, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.052468645999994123, "build_memory_mb": 57.7890625, "search_times": [0.004852757000008978, 0.004526609000009785, 0.0038092720000122426, 0.003806826000015917, 0.003765850000007731, 0.003759209000008923, 0.0037519650000206184, 0.0038327959999833183, 0.00377797300001248, 0.003800925999996707, 0.00376238699999476, 0.0037663619999932507, 0.0038460170000007565, 0.0038684609999961594, 0.0037869900000089274, 0.0037985920000096485, 0.003831903999980568, 0.003850518999996666, 0.003765348999991147, 0.003736715999991702, 0.003788181999993867, 0.0037876509999819064, 0.003815323000026183, 0.0037954260000105933, 0.003859273999978541, 0.0040639469999916855, 0.003989797999992106, 0.003967796999972961, 0.004038328000007141, 0.0040381480000064585, 0.003996310999980324, 0.00396067399998401, 0.0041697620000036295, 0.0037953450000145494, 0.003816374999985328, 0.0037979499999778454, 0.003804352000003064, 0.003828717999994069, 0.0037690159999783646, 0.003865625999992517, 0.003917683999986821, 0.0038897210000072846, 0.004034622000006038, 0.00406717199999207, 0.0040640569999936815, 0.003992132000007587, 0.0038097329999970952, 0.0040638560000161306, 0.004068434999993542, 0.004106855999992831], "search_avg": 0.00391319501999817, "search_p50": 0.0038323499999819433, "search_p95": 0.00414145429999877, "search_p99": 0.004692944480009373}, "sklearn": {"build_time": 0.003382024999979194, "build_memory_mb": 0.0, "search_avg": 0.007352518020000503, "search_p50": 0.0067870879999816225}, "faiss": {"build_time": 0.007847569999995585, "build_memory_mb": 49.41015625, "search_avg": 0.0022496789599978227, "search_p50": 0.0022288254999978108}, "annoy": {"build_time": 1.0977659269999833, "build_memory_mb": 69.56640625, "search_avg": 4.7070300001905704e-05, "search_p50": 4.635650000750502e-05}} -------------------------------------------------------------------------------- /tests/gpu_error_conditions.rs: -------------------------------------------------------------------------------- 1 | #[cfg(feature = "cuda")] 2 | #[test] 3 | fn test_gpu_error_conditions() { 4 | use rust_annie::gpu::l2_distance_gpu; 5 | use rust_annie::gpu::Precision; 6 | // Invalid input sizes 7 | let result = l2_distance_gpu(&[], &[], 3, 1, 1, 0, Precision::Fp32); 8 | assert!(result.is_err(), "Should error on empty input"); 9 | // Mismatched dimensions 10 | let result = l2_distance_gpu(&[1.0, 2.0], &[1.0, 2.0, 3.0], 3, 1, 1, 0, Precision::Fp32); 11 | assert!(result.is_err(), "Should error on mismatched input"); 12 | // Large allocation (simulate OOM) 13 | let big_vec = vec![1.0; 1_000_000_000]; 14 | let result = l2_distance_gpu(&big_vec, &big_vec, 1_000_000_000, 1, 1, 0, Precision::Fp32); 15 | assert!(result.is_err(), "Should error on huge allocation"); 16 | } 17 | 18 | #[cfg(feature = "cuda")] 19 | #[test] 20 | fn test_gpu_memory_management_under_errors() { 21 | use rust_annie::gpu::memory::GpuMemoryPool; 22 | use rust_annie::gpu::Precision; 23 | use rust_annie::gpu::l2_distance_gpu; 24 | 25 | let pool = GpuMemoryPool::new(); 26 | let device_id = 0; 27 | 28 | // Get initial memory state 29 | let initial_usage = pool.memory_usage(device_id).unwrap_or((0, 0)); 30 | 31 | // Try operations that should fail, but not leak memory 32 | let _result1 = l2_distance_gpu(&[], &[], 3, 1, 1, device_id, Precision::Fp32); 33 | let _result2 = l2_distance_gpu(&[1.0, 2.0], &[1.0, 2.0, 3.0], 3, 1, 1, device_id, Precision::Fp32); 34 | 35 | // Memory should not have increased significantly from failed operations 36 | let final_usage = pool.memory_usage(device_id).unwrap_or((0, 0)); 37 | 38 | // There might be some memory allocated for device pool initialization, 39 | // but it shouldn't grow significantly from failed operations 40 | assert!(final_usage.0 <= initial_usage.0 + 1024, "Memory leaked during error conditions"); 41 | } 42 | -------------------------------------------------------------------------------- /benchmarks/271744132a87dd051cb5137c92b6e3c369504ea0-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765764444.94741, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.051924268999982814, "build_memory_mb": 58.0625, "search_times": [0.004720813999995244, 0.004304789000002529, 0.003635841999994227, 0.003621675999966101, 0.0035691990000259466, 0.0035593999999719017, 0.0036519320000252264, 0.0036568920000377148, 0.0036628720000067005, 0.0036910649999981615, 0.0037032980000049065, 0.0036506710000026033, 0.003752985999994962, 0.003689562999966256, 0.0036590259999798036, 0.003629590000002736, 0.0037857519999988654, 0.0038345820000245112, 0.0038380290000077366, 0.00385704499996109, 0.0038616329999854315, 0.003959845999986555, 0.003931333000025461, 0.004079337999996824, 0.0037862130000121397, 0.0037722769999959382, 0.00378659300002937, 0.003821708000032231, 0.0039169760000277165, 0.0038945939999734946, 0.003956458999994084, 0.003948624999964068, 0.003666419000012411, 0.003676316999985829, 0.0036618410000528456, 0.0036825500000077227, 0.0037019559999862395, 0.00368846100002429, 0.0037000110000349196, 0.003702367000016693, 0.0037334639999926367, 0.0036329060000070967, 0.00372187200002827, 0.0036561210000058963, 0.003716241999995873, 0.0037105019999899014, 0.003660797999998522, 0.0037282850000224244, 0.0036973770000372497, 0.003808143000014752], "search_avg": 0.0037747250000040823, "search_p50": 0.003706899999997404, "search_p95": 0.004025566599992203, "search_p99": 0.004516961749998813}, "sklearn": {"build_time": 0.0032416079999961767, "build_memory_mb": 0.0, "search_avg": 0.007956930720000628, "search_p50": 0.0070665130000122645}, "faiss": {"build_time": 0.007659337000006872, "build_memory_mb": 49.2421875, "search_avg": 0.0022002499399945918, "search_p50": 0.0021919024999874637}, "annoy": {"build_time": 1.0489972049999778, "build_memory_mb": 66.74609375, "search_avg": 4.4548379999014285e-05, "search_p50": 4.380649997415276e-05}} -------------------------------------------------------------------------------- /benchmarks/278e428b750fddfc5372371ff16cefedd0ba3c3b-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762563632.610297, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05150576899998782, "build_memory_mb": 57.91796875, "search_times": [0.004732539999992014, 0.0044250969999950485, 0.003783167999984016, 0.003714449000000286, 0.003737712999992482, 0.0036902260000033493, 0.003690132000002677, 0.0037796409999941716, 0.003788847999999234, 0.0037978240000029473, 0.003849381000009089, 0.0037531440000009297, 0.0038190530000008494, 0.0037732180000205062, 0.0037744010000153594, 0.0037969630000134202, 0.003776065000010931, 0.0037682020000033845, 0.003746589000002132, 0.003864540000023453, 0.003807983999990938, 0.0037838490000012825, 0.0037555639999879986, 0.003769993000020122, 0.0037913729999843326, 0.0037962940000113576, 0.0037627400000133093, 0.0037678170000106093, 0.0037538619999963885, 0.0037573390000034124, 0.003851116999982196, 0.004103566000026149, 0.004035960000010164, 0.004057970999980398, 0.004043262999999797, 0.0040510279999921295, 0.004057870999986335, 0.003999722000003203, 0.004007266000002119, 0.004036580999979833, 0.0039523629999962395, 0.003951862999997502, 0.004062440000012657, 0.0037421189999804483, 0.003889924999981531, 0.0037996279999958915, 0.004140505000009398, 0.0041135350000161, 0.004163347000002204, 0.004040581000026577], "search_avg": 0.003898173200001338, "search_p50": 0.0037987259999994194, "search_p95": 0.004153068100005442, "search_p99": 0.0045818929299935}, "sklearn": {"build_time": 0.003459141999996973, "build_memory_mb": 0.125, "search_avg": 0.008313172360000181, "search_p50": 0.0070576244999926985}, "faiss": {"build_time": 0.007749807999999803, "build_memory_mb": 49.3671875, "search_avg": 0.0021446460400034086, "search_p50": 0.0021387055000019473}, "annoy": {"build_time": 1.064716328000003, "build_memory_mb": 66.69140625, "search_avg": 4.423430000201733e-05, "search_p50": 4.3126000008442134e-05}} -------------------------------------------------------------------------------- /benchmarks/3a193f216c60d36c31ec54337cb157dc34310975-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764896744.202595, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05233486200017978, "build_memory_mb": 56.62109375, "search_times": [0.004737608000141336, 0.004461085999992065, 0.003833708000001934, 0.003893581999818707, 0.0037785649999477755, 0.0038233790000958834, 0.0038024790001145448, 0.0038046030001623876, 0.003808701000025394, 0.0038858279999658407, 0.0037699659999361756, 0.003782050999916464, 0.003758075000177996, 0.0038045530000090366, 0.0038438509998286463, 0.003775537999899825, 0.003824989999884565, 0.003790638000054969, 0.003773585000089952, 0.0038245149999056594, 0.0038210249999792723, 0.0038156849998358666, 0.003799624000066615, 0.0037653090000731027, 0.0038215749998471438, 0.003800355999828753, 0.0038520499999776803, 0.004106764999960433, 0.003856942999846069, 0.003871891000017058, 0.0038565519998883246, 0.0038120570000046428, 0.003802830000040558, 0.0038288700000066456, 0.004131803000063883, 0.004001072999926691, 0.004098698999996486, 0.0040664589998868905, 0.004061549999960334, 0.004005973999937851, 0.0038046229999508796, 0.003839620000007926, 0.003773695000063526, 0.0043325920000825136, 0.0040953430000172375, 0.004035761000068305, 0.004072951000125613, 0.003990514999941297, 0.004057530999943992, 0.004025210999998308], "search_avg": 0.003919644659986261, "search_p50": 0.00383128900000429, "search_p95": 0.0042422369500741295, "search_p99": 0.004602112220068192}, "sklearn": {"build_time": 0.003304127999854245, "build_memory_mb": 0.0, "search_avg": 0.007319721420003589, "search_p50": 0.00672069699999156}, "faiss": {"build_time": 0.008030363999978363, "build_memory_mb": 49.23046875, "search_avg": 0.0022328194600140707, "search_p50": 0.0022256579999293535}, "annoy": {"build_time": 1.0632464969999091, "build_memory_mb": 70.39453125, "search_avg": 4.671278001751489e-05, "search_p50": 4.504550008732622e-05}} -------------------------------------------------------------------------------- /benchmarks/0e4345eb437eb398848ca60b3c2f1d3f7457a992-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1766106467.927734, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.052521597000009024, "build_memory_mb": 58.20703125, "search_times": [0.004767643999969096, 0.004354405000015049, 0.003723059000037665, 0.0036605439999561895, 0.003651636000029157, 0.0036933749999548127, 0.0036892869999860523, 0.0036616650000382833, 0.0036462269999901764, 0.0036776349999740887, 0.00368756399996073, 0.0036505649999867273, 0.0036658829999964837, 0.0036138169999730962, 0.0037387290000197027, 0.0037291710000317835, 0.0037223080000217124, 0.003665261999969971, 0.0037658100000044215, 0.0037404329999617403, 0.003653840999959357, 0.0036548129999687262, 0.0036418379999645367, 0.0036114220000058594, 0.0036777349999965736, 0.0037245230000166885, 0.003682865000030233, 0.0036737780000066778, 0.0036725759999853835, 0.0036802199999783625, 0.0036895069999900443, 0.003630959000020084, 0.0036704820000181826, 0.003677154000001792, 0.003707109999993463, 0.003679357999999411, 0.003846699999996872, 0.0036756720000425958, 0.00370883400000821, 0.003799571999991258, 0.003680470000006153, 0.003650614999969548, 0.003603967999993074, 0.003891602999999577, 0.0038740299999631134, 0.0038921140000525156, 0.0039531880000254205, 0.003944241999988662, 0.0038201809999804937, 0.003671332999999777], "search_avg": 0.0037449144399965915, "search_p50": 0.0036803449999922577, "search_p95": 0.00394916230000888, "search_p99": 0.004565156889991612}, "sklearn": {"build_time": 0.0033198090000041702, "build_memory_mb": 0.0, "search_avg": 0.007808228639996742, "search_p50": 0.00674581050000711}, "faiss": {"build_time": 0.007510147999994388, "build_memory_mb": 49.2421875, "search_avg": 0.0021350773400047275, "search_p50": 0.002136686499966345}, "annoy": {"build_time": 1.0473006359999886, "build_memory_mb": 67.25390625, "search_avg": 4.5129180003868894e-05, "search_p50": 4.49439999954393e-05}} -------------------------------------------------------------------------------- /benchmarks/613619157db5e7acaa61f9f4327d089e4f24775d-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765328833.293571, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.051812330000075235, "build_memory_mb": 57.94921875, "search_times": [0.004809054000133983, 0.004439975999957824, 0.0038721470000382396, 0.003764154000009512, 0.0037693839999519696, 0.0037902429999121523, 0.003815080000094895, 0.0038354179998805193, 0.0037885579999965557, 0.003738917999953628, 0.003841818999944735, 0.0037665999998353072, 0.0037301509998997062, 0.0037867669998377096, 0.003791494999859424, 0.0037719790000210196, 0.0038507649999246496, 0.0037708159998146584, 0.0037701870001001225, 0.0038047699999879114, 0.0037973359999341483, 0.0037524320000557054, 0.0037606680000408232, 0.003799260999812759, 0.003896049999866591, 0.003756257999839363, 0.0037579830000140646, 0.003741424000054394, 0.003753905000166924, 0.003739377999863791, 0.0038184559998626355, 0.0038073630000781122, 0.003784631999906196, 0.0037741829999049514, 0.003753273000029367, 0.003763242999866634, 0.0037477130001661862, 0.003761910000093849, 0.0037375049998900067, 0.003795884000055594, 0.003811803000189684, 0.0037750240001059865, 0.003959422000207269, 0.00385706800011576, 0.0038990959999409824, 0.004110560000071928, 0.004105030000118859, 0.004080082999962542, 0.004040991000010763, 0.004048925999995845], "search_avg": 0.0038539028199875247, "search_p50": 0.003789400499954354, "search_p95": 0.004108071500093046, "search_p99": 0.004628205780047664}, "sklearn": {"build_time": 0.003229336999993393, "build_memory_mb": 0.125, "search_avg": 0.007495219539996469, "search_p50": 0.00669378699990375}, "faiss": {"build_time": 0.007678148999957557, "build_memory_mb": 49.30078125, "search_avg": 0.0021605566599964734, "search_p50": 0.0021511045000579543}, "annoy": {"build_time": 1.0432910149997952, "build_memory_mb": 67.71484375, "search_avg": 4.547184000330162e-05, "search_p50": 4.4277499910094775e-05}} -------------------------------------------------------------------------------- /benchmarks/086a756c2e594cd823c2b98164c1bcf2287f8a29-medium.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763982520.884296, "dataset": "medium", "config": {"N": 100000, "D": 128, "k": 20}, "repeats": 50, "rust_annie": {"build_time": 0.05206567000001883, "build_memory_mb": 56.89453125, "search_times": [0.004718732000014825, 0.0044345230000146785, 0.0038426619999825107, 0.0037382180000236076, 0.003708291000009467, 0.0038026269999988926, 0.003806064000002607, 0.0038169139999979507, 0.00394800800000894, 0.003926798000009057, 0.003781927999995105, 0.003856847999998081, 0.0038123649999874942, 0.003770836999990479, 0.0037739139999928284, 0.0037517629999967994, 0.0038219329999833462, 0.0038302479999856587, 0.0037868880000075933, 0.003839626000001317, 0.0037902840000185734, 0.003760569000007763, 0.0037914360000002034, 0.0038385439999899518, 0.0038035689999844635, 0.0038056820000065272, 0.003825549999987743, 0.003960941999991974, 0.0038261109999950804, 0.0037562109999953464, 0.003747453999977779, 0.003808437999992975, 0.0037344799999914358, 0.003754958000001807, 0.0037613599999986036, 0.0037763079999990623, 0.0037786930000152097, 0.0037761280000268016, 0.0038019259999941823, 0.0038406379999855744, 0.0038001819999919917, 0.0039543799999819385, 0.0037653870000156076, 0.003755048000016359, 0.0037838220000026013, 0.0037784919999808153, 0.0046148790000017925, 0.003835579000025291, 0.0038805019999870183, 0.004054235000012341], "search_avg": 0.003858619479999561, "search_p50": 0.003803097999991678, "search_p95": 0.004263393400013625, "search_p99": 0.004667844030008438}, "sklearn": {"build_time": 0.003610278999985894, "build_memory_mb": 0.125, "search_avg": 0.008639143240001203, "search_p50": 0.007125270999992495}, "faiss": {"build_time": 0.007720709000011539, "build_memory_mb": 49.36328125, "search_avg": 0.002310696999995798, "search_p50": 0.0022604219999919906}, "annoy": {"build_time": 1.0479698999999982, "build_memory_mb": 66.86328125, "search_avg": 4.539636000060909e-05, "search_p50": 4.575500000214561e-05}} -------------------------------------------------------------------------------- /benchmarks/45813c5d262c192e2583c95564cd352b3e2aec7d-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761872624.388847, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025346789999787234, "build_memory_mb": 3.0, "search_times": [0.00048800400000459376, 0.000398657000005187, 0.0003998090000152388, 0.00037925899999891044, 0.0003904719999923145, 0.00031825599998569487, 0.00031083199999670796, 0.0003334849999987455, 0.0003142880000268633, 0.00030017200000997946, 0.0002742659999910302, 0.0003182659999936277, 0.000400089999999409, 0.0002965350000181388, 0.0003260409999938929, 0.0003147790000070927, 0.0003157610000243949, 0.00032109199997876203, 0.0003206309999939094, 0.00031206400001337897, 0.0003141079999977592, 0.000318797999995013, 0.00030323799998654977, 0.0003196979999984251, 0.00031215500001735563, 0.0003132070000049225, 0.00033891400002517, 0.0003316019999886066, 0.000306755000025305, 0.0003315609999958724, 0.0003071959999942919, 0.000287778999989996, 0.0003097199999899658, 0.0003079969999930654, 0.00030375899999057765, 0.0002935090000164564, 0.00032046000001173525, 0.0003277939999861701, 0.00030386000000248714, 0.0003228649999869049, 0.000330258999980515, 0.0003235060000008616, 0.0003270530000065719, 0.00029896999998868523, 0.00030875799998852926, 0.0003452069999809737, 0.00029676599999106656, 0.0003122150000081092, 0.00029581399999756286, 0.00032049099999653663], "search_avg": 0.00032533545999967827, "search_p50": 0.0003170085000050449, "search_p95": 0.0003992906000107155, "search_p99": 0.00044492614000205303}, "sklearn": {"build_time": 0.0006709159999900294, "build_memory_mb": 0.0, "search_avg": 0.0015866316800008918, "search_p50": 0.000596417000011229}, "faiss": {"build_time": 0.001139123999990943, "build_memory_mb": 2.375, "search_avg": 8.607963999963886e-05, "search_p50": 8.674750000636777e-05}, "annoy": {"build_time": 0.05921398000000977, "build_memory_mb": 6.0, "search_avg": 1.7205660000740863e-05, "search_p50": 1.636099999302587e-05}} -------------------------------------------------------------------------------- /benchmarks/4830f9850ba7983b3a0292efd5e96fa141e72fe4-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765242326.861664, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002493350999998256, "build_memory_mb": 3.125, "search_times": [0.0004231700000048022, 0.00039469600000074934, 0.0003166810000152509, 0.0003045779999979459, 0.0003440720000185138, 0.0002915739999878042, 0.00029377699999599827, 0.0002916439999864906, 0.00032982499999434367, 0.00030675200000018776, 0.0003165509999973892, 0.00031736200000409553, 0.00030088099998692996, 0.00031635099998084115, 0.0003174530000080722, 0.0002905510000061895, 0.0002825269999959801, 0.00032115999999859923, 0.000281615000005786, 0.000320346999984622, 0.000337670000021717, 0.000307012999996914, 0.00031632099998546437, 0.00029376799997749004, 0.0004295639999725154, 0.0003464759999758371, 0.00030607100001134313, 0.000283158000002004, 0.0002818659999945794, 0.0002928060000044752, 0.00033400300000607785, 0.0003029350000076647, 0.00032401100000356564, 0.0003321890000052008, 0.0003242150000062338, 0.00029580200001078083, 0.0003056300000139345, 0.00029889700002172503, 0.00029379800000128853, 0.0003342630000133795, 0.00029914800001051844, 0.000296914000017523, 0.0002928760000031616, 0.0003103790000125173, 0.00030625099998360383, 0.000299097999999276, 0.00032271300000275005, 0.0002998389999788742, 0.00031047999999600506, 0.0003083459999970728], "search_avg": 0.0003149613400000817, "search_p50": 0.0003068824999985509, "search_p95": 0.0003729969999895387, "search_p99": 0.0004264309399883359}, "sklearn": {"build_time": 0.0005814339999972162, "build_memory_mb": 0.0, "search_avg": 0.0012915115999976479, "search_p50": 0.0005788494999876548}, "faiss": {"build_time": 0.0011038990000145077, "build_memory_mb": 2.25, "search_avg": 7.901713999899584e-05, "search_p50": 7.59614999878977e-05}, "annoy": {"build_time": 0.058014047000000346, "build_memory_mb": 7.96875, "search_avg": 1.6024719997176362e-05, "search_p50": 1.5359000002490575e-05}} -------------------------------------------------------------------------------- /benchmarks/76e6fd760d7889721a100dca40356d562bb82a41-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753751878.991215, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002322981999896001, "build_memory_mb": 3.25, "search_times": [0.0004425160000209871, 0.0003215190001810697, 0.00031325400004789117, 0.0002920540000559413, 0.0003209379999589146, 0.00030651199995190836, 0.0003295540000181063, 0.0003187739998793404, 0.00030291500002022076, 0.0003197070000169333, 0.0003246450000915502, 0.0003098580000369111, 0.0003125520001958648, 0.0003161189999900671, 0.0003021830000307091, 0.00042097499999727006, 0.0003112599999894883, 0.0002923449999343575, 0.00040316200011147885, 0.00030872499996803526, 0.0003034059998299199, 0.000313634999884016, 0.0003171510002175637, 0.00031140099986259884, 0.0003069899998990877, 0.0003246449998641765, 0.00029793599992444797, 0.00029683299999305746, 0.0003033760001471819, 0.0003182039999956032, 0.0003011909998349438, 0.0003042130001631449, 0.0003143460000956111, 0.0003014119999988907, 0.0002956820001145388, 0.0003260080000018206, 0.00029650300007233454, 0.00030020999997759645, 0.0003160000001116714, 0.0003095670001584949, 0.00029036199998699885, 0.00028892799991808715, 0.0003273400000125548, 0.00031337499990513606, 0.0002889679999498185, 0.000323132999938025, 0.000317271000085384, 0.000289269000177228, 0.00030674200002067664, 0.00028643399991779006], "search_avg": 0.0003152019600111089, "search_p50": 0.0003105590000131997, "search_p95": 0.000370038400069461, "search_p99": 0.0004319609100093657}, "sklearn": {"build_time": 0.0006661620000159019, "build_memory_mb": 0.0, "search_avg": 0.0011545261600258527, "search_p50": 0.000583382499939944}, "faiss": {"build_time": 0.0010925770000085322, "build_memory_mb": 2.25, "search_avg": 8.015546000933682e-05, "search_p50": 7.565600003545114e-05}, "annoy": {"build_time": 0.060972263999929055, "build_memory_mb": 7.5390625, "search_avg": 1.6562740001972996e-05, "search_p50": 1.573950009969849e-05}} -------------------------------------------------------------------------------- /benchmarks/96d5729cf795e8960b8160e51fa3a000cf0197e4-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762650378.94176, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0024911920000079135, "build_memory_mb": 3.125, "search_times": [0.0007071790000026112, 0.00041544099998702677, 0.00044364600000790233, 0.0007202240000054871, 0.0007300630000059982, 0.0006732249999998885, 0.0005597420000071907, 0.0007148340000071585, 0.0007924989999992249, 0.0008291179999986298, 0.0008442060000106721, 0.0005250770000060356, 0.0004215320000042766, 0.0005110700000017232, 0.0004447960000106832, 0.00043139000000280703, 0.000489178999998785, 0.0004609159999944268, 0.0004336749999964695, 0.0004528110000023844, 0.0004146889999958603, 0.00048071399999116693, 0.00039286800000581934, 0.0004381829999999809, 0.0005187050000046156, 0.0004214719999993122, 0.0005158390000019608, 0.00041610199998842745, 0.0004607460000016772, 0.00041414899999381305, 0.00047864999999092106, 0.0004140390000060279, 0.0005683079999982965, 0.00046680699999512854, 0.0004889190000056942, 0.0004485029999869994, 0.0004332540000007157, 0.00047841900000378246, 0.0004152400000094758, 0.00047776799999610375, 0.00041600199999436427, 0.000489469999990888, 0.000414207999995142, 0.00046165800000608215, 0.0004031880000070487, 0.0004337749999905327, 0.00041821599999991577, 0.00043190200000253753, 0.0003516210000071851, 0.0004177250000054755], "search_avg": 0.0004996352400004866, "search_p50": 0.0004567785000020308, "search_p95": 0.0007644028000022727, "search_p99": 0.0008368128800047713}, "sklearn": {"build_time": 0.0006056579999977885, "build_memory_mb": 0.0, "search_avg": 0.0012467947000004641, "search_p50": 0.000559907500004897}, "faiss": {"build_time": 0.001092722999999296, "build_memory_mb": 2.3828125, "search_avg": 7.677080000007664e-05, "search_p50": 7.12490000012167e-05}, "annoy": {"build_time": 0.058374391999990394, "build_memory_mb": 5.625, "search_avg": 1.5737179999462115e-05, "search_p50": 1.5148999992220524e-05}} -------------------------------------------------------------------------------- /benchmarks/a2b3bb270e5d98e95211b0a94690ca31645ed6c1-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754413262.063683, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002409863000025325, "build_memory_mb": 3.25, "search_times": [0.00048195099998338264, 0.0006577460000016799, 0.0005720770000152697, 0.0002859370000010131, 0.00035390400000778754, 0.0006681650000359696, 0.0006640469999865672, 0.0006850160000340111, 0.0006440799999722913, 0.000728385000002163, 0.0005047320000244326, 0.0004909570000108943, 0.0004181730000141215, 0.0006960759999969923, 0.0007480620000137606, 0.00029887199997347125, 0.0003500870000152645, 0.0007721570000285283, 0.00033367700001463163, 0.0006609920000073544, 0.000678955000012138, 0.0004712499999754982, 0.00041467599999123195, 0.0002956860000153938, 0.00033664200003613587, 0.000348513999995248, 0.0003450579999935144, 0.00032738499999140913, 0.00030667699996911324, 0.00032393900005445175, 0.00035000599996237725, 0.0003264229999899726, 0.00029791100001830273, 0.00032144400000788664, 0.00032288699998161974, 0.0003144610000163084, 0.00033140199997205855, 0.00032228500003839144, 0.00031142500000669315, 0.0003321940000091672, 0.0003090810000117017, 0.00030973200000516954, 0.0003230169999710597, 0.0002987529999813887, 0.000304412999980741, 0.0002993539999920358, 0.0003230169999710597, 0.0003052529999649778, 0.00030629499997303355, 0.0003432650000263493], "search_avg": 0.0004243298600010803, "search_p50": 0.00033515950002538375, "search_p95": 0.0007138459499998361, "search_p99": 0.0007603504500212921}, "sklearn": {"build_time": 0.0006710099999622798, "build_memory_mb": 0.0, "search_avg": 0.001402635420004117, "search_p50": 0.0009426420000124835}, "faiss": {"build_time": 0.0011319519999801742, "build_memory_mb": 2.25, "search_avg": 8.453241999859529e-05, "search_p50": 7.281999998554056e-05}, "annoy": {"build_time": 0.06109057000003304, "build_memory_mb": 5.875, "search_avg": 2.052285999866399e-05, "search_p50": 1.889949999167584e-05}} -------------------------------------------------------------------------------- /benchmarks/12439ddfa265bf94d1490f43ce55bafb497a21a2-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761095006.176056, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025243129999807934, "build_memory_mb": 3.125, "search_times": [0.0004472980000400639, 0.0006205029999932776, 0.00042061800002102245, 0.0005554309999524776, 0.0005248239999673388, 0.0005382389999795123, 0.0005643879999865931, 0.00031550199997809614, 0.00048476900002469847, 0.0005232209999803672, 0.000604723999970247, 0.00045068500003253575, 0.00029525299999022536, 0.0003143289999911758, 0.0003091590000394717, 0.0003094799999985298, 0.0003187970000340101, 0.0002899639999895953, 0.0002931299999886505, 0.00030815799999572846, 0.00029630599999563856, 0.00034655999996857645, 0.0002912560000254416, 0.0003246289999765395, 0.0003342069999803243, 0.00030699600000616556, 0.0003008539999882487, 0.00030921000001171706, 0.00029898099995762095, 0.00031806600003392305, 0.000319257999990441, 0.00032908699995459756, 0.000343083000018396, 0.0003464300000359799, 0.000348022000025594, 0.0003339149999987967, 0.00032053099999984624, 0.00031705499998224695, 0.0003097910000064985, 0.00035235999996530154, 0.0003080679999811764, 0.0002953039999624707, 0.00032647000000451953, 0.00033917600001132087, 0.0002816589999952157, 0.0003159820000178115, 0.0003116849999855731, 0.0003126759999645401, 0.0003168850000179191, 0.00031828699997049625], "search_avg": 0.0003612252199957311, "search_p50": 0.0003185420000022532, "search_p95": 0.000560357349971241, "search_p99": 0.0006127712899819925}, "sklearn": {"build_time": 0.0005769910000026357, "build_memory_mb": 0.0, "search_avg": 0.0015495491399997263, "search_p50": 0.0005812095000123918}, "faiss": {"build_time": 0.0011518899999600762, "build_memory_mb": 2.375, "search_avg": 8.005895999872336e-05, "search_p50": 7.653349999259262e-05}, "annoy": {"build_time": 0.06068488599999, "build_memory_mb": 6.01171875, "search_avg": 1.6307840000990835e-05, "search_p50": 1.569450000715733e-05}} -------------------------------------------------------------------------------- /benchmarks/792f2c23fd2d9f10f8f068efbb33c156454ca101-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1752974152.347007, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002263216000073953, "build_memory_mb": 3.125, "search_times": [0.0005608300000403688, 0.0004631470000049376, 0.00047322600005372806, 0.0004560840000067401, 0.0004695190000347793, 0.0004482399999687914, 0.0004602320000230975, 0.0004489010000270355, 0.0004600209999807703, 0.00044802899992646417, 0.0004972510000698094, 0.00044731799994224275, 0.00045011300005626254, 0.0004663839999921038, 0.0004473180000559296, 0.00046349799993095075, 0.00045064400001137983, 0.00045763700006773433, 0.00044766799999251816, 0.00046070300004430464, 0.0004512550000299598, 0.0004562249999935375, 0.00044977200002449536, 0.0004496220000191897, 0.00045969099994636053, 0.00044994200004566665, 0.00045792800005983736, 0.0004505540000536712, 0.0004590300000018033, 0.000450213000021904, 0.00045610400002260576, 0.0004464360000611123, 0.0004546710000568055, 0.00044611600003463536, 0.0004474789999449058, 0.00045737699997516756, 0.0004494919999160629, 0.00045789800003603887, 0.00044660700007170817, 0.0004545119999193048, 0.00045040400004836556, 0.000456675999998879, 0.0004570059999196019, 0.00045700600003328873, 0.0004502140000113286, 0.00044910100007200526, 0.00045754699999633885, 0.00044698700003209524, 0.0004539300000487856, 0.0004486699999688426], "search_avg": 0.000457104560011885, "search_p50": 0.0004542209999840452, "search_p95": 0.0004715578500452011, "search_p99": 0.0005296762900547945}, "sklearn": {"build_time": 0.0005923889999621679, "build_memory_mb": 0.0, "search_avg": 0.001250998640002763, "search_p50": 0.0007254435000731974}, "faiss": {"build_time": 0.001036821999946369, "build_memory_mb": 2.265625, "search_avg": 7.872585999166404e-05, "search_p50": 7.249000003639594e-05}, "annoy": {"build_time": 0.06002693100003853, "build_memory_mb": 6.0, "search_avg": 1.5867859995069013e-05, "search_p50": 1.5217999987271469e-05}} -------------------------------------------------------------------------------- /benchmarks/8b3fb93826affa61e313892cf360c116e8f370c6-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755651706.87965, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025014029999965715, "build_memory_mb": 3.375, "search_times": [0.0004305120000083207, 0.000333411000013939, 0.00032967500001745975, 0.0003140060000248468, 0.0003318830000011985, 0.00031637999998679334, 0.0003467459999910716, 0.00031174100001862826, 0.0003414459999930841, 0.0003151070000058098, 0.00032032699999717806, 0.00032782099998485137, 0.00030467799999200906, 0.0002923549999991337, 0.0003128530000253704, 0.00033319099998152524, 0.00032763100000465784, 0.0003163000000085958, 0.00030769400001418035, 0.00029418900001587645, 0.00031086000001323555, 0.00030731300000752526, 0.0003188249999936943, 0.00034121600000958097, 0.00032278199998359014, 0.00030657199999950535, 0.0003147070000011354, 0.0003280710000126419, 0.0002980360000037763, 0.00031051899998146837, 0.00029158300000631243, 0.0003045480000025691, 0.00029592099997444166, 0.00031444700002225545, 0.00030565000000137843, 0.0003192849999891223, 0.0003037060000110614, 0.000321248999995305, 0.0002945690000046852, 0.0003063810000014655, 0.0002986069999906249, 0.00031448199999317694, 0.000319705999999087, 0.0002898809999862806, 0.000289530000003424, 0.0002936480000244046, 0.0003132740000069134, 0.0002902119999816932, 0.0003217100000085793, 0.00030681199999094133], "search_avg": 0.0003152409600016881, "search_p50": 0.0003136400000158801, "search_p95": 0.0003413425000005077, "search_p99": 0.00038946665999986844}, "sklearn": {"build_time": 0.0006499609999934819, "build_memory_mb": 0.0, "search_avg": 0.0010472319599995217, "search_p50": 0.0005828309999884596}, "faiss": {"build_time": 0.0010819869999920684, "build_memory_mb": 2.375, "search_avg": 7.551462000037645e-05, "search_p50": 7.084699998927135e-05}, "annoy": {"build_time": 0.06088041799998223, "build_memory_mb": 6.0, "search_avg": 1.8670119998205338e-05, "search_p50": 1.7918000011718505e-05}} -------------------------------------------------------------------------------- /benchmarks/a8aa35b082d240204e0923b2fa64b437c4803c3c-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1766019880.519309, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002519486999972287, "build_memory_mb": 3.14453125, "search_times": [0.0008475590000216471, 0.0005078709999679631, 0.00046587200000658413, 0.00039086200001747784, 0.00043947300002855627, 0.00042220999995379316, 0.0004276610000033543, 0.00047902699998303433, 0.0004756310000288977, 0.0004252460000202518, 0.000459911000007196, 0.0004452240000318852, 0.0004621349999638369, 0.00041473700002825353, 0.0004600510000045688, 0.0004047280000349929, 0.0005856049999692914, 0.0004985429999919688, 0.0004958590000114782, 0.00040855499997860534, 0.0004905990000452221, 0.000636170999996466, 0.0004489509999530128, 0.000413140000034673, 0.0007156300000019655, 0.00042131899999731104, 0.0005747669999891514, 0.0004182430000128079, 0.00047132299999930183, 0.0005863920000024336, 0.000409636999961549, 0.0005658059999973375, 0.0005136550000202078, 0.0004147230000057789, 0.000777755999990859, 0.0005503709999743478, 0.0004415359999825341, 0.0006476829999542133, 0.00039237400000047273, 0.0004392829999915193, 0.00042912300000352843, 0.00041749499996512895, 0.0006639129999825855, 0.0006756540000196765, 0.000670004000028257, 0.0006898510000041824, 0.0005088320000368185, 0.00058062699997663, 0.0006972450000262143, 0.0005557599999974627], "search_avg": 0.0005146924600001057, "search_p50": 0.00047347700001409976, "search_p95": 0.0007073567500128775, "search_p99": 0.0008133555300065608}, "sklearn": {"build_time": 0.0006267940000270755, "build_memory_mb": 0.0, "search_avg": 0.0016159871799970916, "search_p50": 0.0006033594999905745}, "faiss": {"build_time": 0.001086673999964205, "build_memory_mb": 2.25390625, "search_avg": 8.28831200044533e-05, "search_p50": 7.596300002887801e-05}, "annoy": {"build_time": 0.05994300099996508, "build_memory_mb": 6.015625, "search_avg": 1.7132679998894674e-05, "search_p50": 1.6259999966905525e-05}} -------------------------------------------------------------------------------- /benchmarks/e282f525b14ee4f5dc1df79d032e6ff381d17e5b-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755997719.726549, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.003499975000067934, "build_memory_mb": 3.0, "search_times": [0.0007033730000784999, 0.000461953000012727, 0.00042247700002917554, 0.0004106769999907556, 0.0005454789999248533, 0.0003673259999459333, 0.0003026850000651393, 0.00034708900000168796, 0.00030519000006279384, 0.00028926999993927893, 0.00030762400001549395, 0.0003043789999992441, 0.00029966900001454633, 0.00032229099997493904, 0.00030508999998346553, 0.0002994899999748668, 0.0002962430000934546, 0.00031623000006675284, 0.00032113899999330897, 0.00027963200000158395, 0.00031920699996135227, 0.000286114000005, 0.00029650400006175914, 0.0003173229999902105, 0.00030896700002358557, 0.00029449000010117743, 0.000315299000021696, 0.00029408900002181326, 0.00029176400005326286, 0.0002953709999928833, 0.00030637199995453557, 0.00029384899994511215, 0.00030485899992527266, 0.0003153889999794046, 0.0002944599999636921, 0.00028641500000503584, 0.0003105299999788258, 0.00030274499999904947, 0.00028806800003167155, 0.000309678000007807, 0.00031005799996819405, 0.0002936480000244046, 0.00029032299994469213, 0.0003113010000106442, 0.0002993790000118679, 0.0002934679999953005, 0.00030808500002876826, 0.0002999399999907837, 0.0002968239999745492, 0.0002971240000988473], "search_avg": 0.000324778980004794, "search_p50": 0.0003046189999622584, "search_p95": 0.00044418880002012874, "search_p99": 0.0006260049400032127}, "sklearn": {"build_time": 0.0005480730000044787, "build_memory_mb": 0.0, "search_avg": 0.0010982887199907055, "search_p50": 0.0005749885000341237}, "faiss": {"build_time": 0.0010761390000197935, "build_memory_mb": 2.37890625, "search_avg": 7.55324999977347e-05, "search_p50": 7.434849999299331e-05}, "annoy": {"build_time": 0.0600895480000645, "build_memory_mb": 6.125, "search_avg": 1.6200400002617242e-05, "search_p50": 1.532850001240149e-05}} -------------------------------------------------------------------------------- /benchmarks/f37b1b6361ed5f3d9eda6e73f8d6793010fc66a8-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765850637.666402, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.00261554399992292, "build_memory_mb": 3.25, "search_times": [0.0004689989999633326, 0.00036526500002764806, 0.00028835000000526634, 0.000298238999903333, 0.0002717590000429482, 0.0003436750000673783, 0.00028769899995495507, 0.0003225550000252042, 0.00030018299992207176, 0.0002812170000652259, 0.00033291299996562884, 0.00027563699995880597, 0.00031807599998501246, 0.0002986389999932726, 0.0003066639999360632, 0.00032270500003050984, 0.0003226450000965997, 0.00031044199999996636, 0.0002903849999711383, 0.0003411299999243056, 0.0002863469999283552, 0.000313548000008268, 0.0002813080000123591, 0.0003157720000217523, 0.0002943219999451685, 0.00030457100001513027, 0.00030013200000666984, 0.00031069299996033806, 0.0003011640000067928, 0.00030016300001989293, 0.0002919470000506408, 0.0003094600000395076, 0.000295814000082828, 0.0003199500000619082, 0.00029567399997176835, 0.0002805259999831833, 0.0002899630000001707, 0.0003122549999261537, 0.0003077269999494092, 0.00032580100003087864, 0.0002921369999739909, 0.00029791899999054294, 0.0002979089999826101, 0.0003158819999953266, 0.0002830600000152117, 0.00030137499993543315, 0.00035527600005025306, 0.00028888200006349507, 0.0003032879999409488, 0.0003401179999400483], "search_avg": 0.00030920319999495406, "search_p50": 0.00030126949997111296, "search_p95": 0.00035005555005795935, "search_p99": 0.000418169339994847}, "sklearn": {"build_time": 0.0006152629999860437, "build_memory_mb": 0.0, "search_avg": 0.001227578900000026, "search_p50": 0.000574041499987743}, "faiss": {"build_time": 0.0011747820000209686, "build_memory_mb": 2.25, "search_avg": 7.802908000030584e-05, "search_p50": 7.412449997445947e-05}, "annoy": {"build_time": 0.05890913099995032, "build_memory_mb": 7.78515625, "search_avg": 1.6943300008733785e-05, "search_p50": 1.5879999978096748e-05}} -------------------------------------------------------------------------------- /benchmarks/01139935ae021c193a735905483aa1683648b867-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755393075.942174, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0028830549999980803, "build_memory_mb": 3.5, "search_times": [0.0004567739999998821, 0.00031999899999846093, 0.00032090800000617037, 0.0003218820000085998, 0.00038225599999464066, 0.0002904840000041986, 0.00029711600001292027, 0.000297046000000023, 0.0003069140000064863, 0.0003308790000033923, 0.00031278499999132237, 0.0002935300000075358, 0.0003151399999978821, 0.0002907140000019126, 0.000282759000000965, 0.00028563499999734177, 0.00034885300000553343, 0.0002986009999972339, 0.0002962639999992689, 0.0003008430000051021, 0.0002978370000050745, 0.0002824879999963059, 0.00029899900000884827, 0.0002821079999932863, 0.00029568300000448744, 0.00029480199999909473, 0.00034055499999396943, 0.00029558300001042426, 0.0002891809999994166, 0.00033192099999723723, 0.0003330330000039794, 0.0003124050000025136, 0.00031651199999771507, 0.00041469599999288675, 0.00031660199999805627, 0.000321632000009231, 0.0003062230000097088, 0.0003164820000023383, 0.00032664100000090457, 0.00029756699998984004, 0.0003274030000000039, 0.00031685300000106054, 0.00029635500000324555, 0.00030280600000764935, 0.000302004999994665, 0.00033026799999902323, 0.00028487299999824245, 0.00029977000001224496, 0.0003159609999983104, 0.000301604000000566], "search_avg": 0.00031396460000138404, "search_p50": 0.0003045145000086791, "search_p95": 0.0003672246499995423, "search_p99": 0.0004361557799964543}, "sklearn": {"build_time": 0.0005788839999922857, "build_memory_mb": 0.0, "search_avg": 0.0010716385599994283, "search_p50": 0.0005870029999996973}, "faiss": {"build_time": 0.0010762530000079096, "build_memory_mb": 2.375, "search_avg": 7.480357999980924e-05, "search_p50": 7.124350000253798e-05}, "annoy": {"build_time": 0.06083112099999255, "build_memory_mb": 7.52734375, "search_avg": 1.6105119999565432e-05, "search_p50": 1.5593999997065566e-05}} -------------------------------------------------------------------------------- /benchmarks/077abf075c12368405e4211cd01bda8d9bff5da2-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755824531.013162, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002442439999995827, "build_memory_mb": 3.375, "search_times": [0.00042387599999926806, 0.00033022999998877367, 0.0003420830000067099, 0.0003023680000069362, 0.00030063500000210297, 0.0003104529999973238, 0.0002836330000093312, 0.00030183799999861094, 0.0003056349999894792, 0.0003010859999932336, 0.00028641800000173134, 0.0003265240000018821, 0.00029670700000394845, 0.0003199209999991126, 0.00029456299999708335, 0.00033739399999888064, 0.0003005149999921741, 0.00028849299999933464, 0.00032820699999547287, 0.00029394300000262774, 0.0003246299999943858, 0.00034135100000298735, 0.00029904100000521794, 0.00030912100000080045, 0.0003304209999868135, 0.00031503199998894615, 0.0002970179999977063, 0.00032828699998788125, 0.0003166859999907956, 0.0002962060000015754, 0.0003126470000012205, 0.00030523399999538015, 0.00030339100000276176, 0.000330801000004044, 0.00032689500000060434, 0.00030025499999908334, 0.0003220150000089461, 0.0003057739999974274, 0.000299441999999317, 0.00031112399999244644, 0.00032547200000010434, 0.0002967879999999923, 0.00030704600000319715, 0.000336723000003758, 0.0002942219999937379, 0.0002976899999964644, 0.00031012299999133575, 0.0003195400000066684, 0.00031146500001000277, 0.00028677899999252077], "search_avg": 0.0003127148199988028, "search_p50": 0.0003080835000019988, "search_p95": 0.0003395703500011393, "search_p99": 0.0003837974300029144}, "sklearn": {"build_time": 0.0006684259999900632, "build_memory_mb": 0.0, "search_avg": 0.0010887298600002282, "search_p50": 0.0005948029999984783}, "faiss": {"build_time": 0.0010988750000109349, "build_memory_mb": 2.375, "search_avg": 7.723171999970191e-05, "search_p50": 7.208499999933338e-05}, "annoy": {"build_time": 0.06048339899999178, "build_memory_mb": 6.0, "search_avg": 1.6629020001062146e-05, "search_p50": 1.6055000003234454e-05}} -------------------------------------------------------------------------------- /benchmarks/0c6fe5d2f9c0c553ce16f69796368e1aaf3e324c-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1756256450.964402, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002540243999987979, "build_memory_mb": 3.0, "search_times": [0.0004235919999757698, 0.0003275839999901109, 0.0003127349999942908, 0.0003263609999919481, 0.00032397600000422244, 0.0003196409999759453, 0.00028955199999813885, 0.00029455099999609047, 0.0003035279999892282, 0.0002969159999963722, 0.00031342700000891455, 0.00029249800002162374, 0.0003182949999995799, 0.00031026099998143764, 0.00030899899999781155, 0.00032641100000319057, 0.00030860699999379904, 0.0003254990000129965, 0.00029629400000885653, 0.0003046499999754815, 0.0003130560000101923, 0.0003167520000033619, 0.0003282140000067102, 0.0003238959999976032, 0.0003144280000242361, 0.00030607299999019233, 0.00029475099998421683, 0.00033695099997999023, 0.00030171500000619744, 0.0003085980000037125, 0.000318727000006902, 0.000322622999988198, 0.0003010629999948833, 0.00032711200000790086, 0.0003289260000087779, 0.00030587300000206596, 0.000323575999999548, 0.0003049409999960062, 0.00032763400000135334, 0.00031303599999432663, 0.00032085099999790145, 0.0003000419999921178, 0.00032467800002677905, 0.0003009330000054433, 0.00030311700001561803, 0.0002961739999989277, 0.00032538900001100046, 0.0003032569999845691, 0.0003110220000053232, 0.00031159400001001814], "search_avg": 0.00031476757999939766, "search_p50": 0.0003128854999943087, "search_p95": 0.00032860560000784743, "search_p99": 0.00038113790997783764}, "sklearn": {"build_time": 0.0008287520000180848, "build_memory_mb": 0.0, "search_avg": 0.001238489540000387, "search_p50": 0.0008758040000031997}, "faiss": {"build_time": 0.0010588019999886455, "build_memory_mb": 2.25, "search_avg": 7.739097999831301e-05, "search_p50": 7.520100000135699e-05}, "annoy": {"build_time": 0.06554148300000406, "build_memory_mb": 7.24609375, "search_avg": 1.614459999927931e-05, "search_p50": 1.5698999987989737e-05}} -------------------------------------------------------------------------------- /benchmarks/1dfe992628d2277127e7c3ad6f0d3eca30693909-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753126966.267737, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0022049959999890234, "build_memory_mb": 3.25, "search_times": [0.00040643700003784033, 0.0003322290000369321, 0.0002893689999723392, 0.0003122809999922538, 0.00031927499998118947, 0.000291882999988502, 0.000284368999984963, 0.0003230510000094, 0.0002906210000332976, 0.00027945000005047405, 0.00029232400004275405, 0.0003205570000091029, 0.0003165399999716101, 0.0003187930000194683, 0.0003760099999681188, 0.00038942499998029234, 0.00028423899999552305, 0.00032500499997922816, 0.00032043699997075237, 0.00029460899997957313, 0.0003175310000074205, 0.0002953999999704138, 0.00031100999996169776, 0.0003237530000319566, 0.0003204159999654621, 0.000322349999976268, 0.0003158479999569863, 0.00029471900000999085, 0.00030724200001941426, 0.00031887400001551214, 0.00030299399998057197, 0.0003077929999903972, 0.00029799499998262036, 0.0003001190000304632, 0.00029984799999738243, 0.0003018820000306732, 0.0003061600000364706, 0.00029942800000526404, 0.00031637900002579045, 0.00033470399995394473, 0.0003211579999629066, 0.0002990360000012515, 0.00029732399997328685, 0.00032587700002295605, 0.0002903500000002168, 0.0002912520000108998, 0.0003281510000192611, 0.00029208399996605294, 0.00031852300003265555, 0.0003167490000350881], "search_avg": 0.00031283705999953784, "search_p50": 0.00031164549997697577, "search_p95": 0.0003574222999617403, "search_p99": 0.0003981011200096418}, "sklearn": {"build_time": 0.0005205799999998817, "build_memory_mb": 0.0, "search_avg": 0.0012665023000010933, "search_p50": 0.0007207269999867094}, "faiss": {"build_time": 0.001004290000025776, "build_memory_mb": 2.375, "search_avg": 8.451351999610779e-05, "search_p50": 8.101049999709176e-05}, "annoy": {"build_time": 0.061275004000037825, "build_memory_mb": 6.046875, "search_avg": 1.6698080004289294e-05, "search_p50": 1.5834500004530128e-05}} -------------------------------------------------------------------------------- /benchmarks/2682440c2812a110e7849d15499b0c394debd835-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763686990.331424, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025930510000193863, "build_memory_mb": 3.01953125, "search_times": [0.00047425500000031207, 0.000355043000013211, 0.0003663839999887841, 0.00033170899999390713, 0.00031631999999603977, 0.00033104799999250645, 0.0003230430000087381, 0.0002996990000099231, 0.0003090069999984735, 0.00030990799999131013, 0.0003058810000027279, 0.00033375199998886274, 0.00030361700001435565, 0.00031937599999309896, 0.000308846999985235, 0.0002911939999989954, 0.000291603999983181, 0.0003338330000133283, 0.00031388599998649624, 0.0003048989999854257, 0.0003079640000009931, 0.0003112390000126197, 0.0003172720000179652, 0.0003027150000036727, 0.0003247059999864632, 0.0002973050000036892, 0.000326740000019754, 0.00030003000000533575, 0.0003137559999970563, 0.000299388999991379, 0.00030657299998892995, 0.00030956699998796466, 0.0003197069999885116, 0.0003403949999949418, 0.00031919500000299195, 0.00031026900001052127, 0.00029584200001409044, 0.0003395739999803027, 0.0003225130000146237, 0.0003186550000009447, 0.0003251569999918047, 0.0003158089999999447, 0.0002994589999900654, 0.00030934800000181895, 0.00031538799998998, 0.0002965340000002925, 0.00030221399998708876, 0.00030494999998609273, 0.0002967739999917285, 0.0003232630000127301], "search_avg": 0.0003179121399983842, "search_p50": 0.000312497500004838, "search_p95": 0.0003484514000049898, "search_p99": 0.00042139820999466317}, "sklearn": {"build_time": 0.0006144660000018121, "build_memory_mb": 0.0, "search_avg": 0.001373692160001383, "search_p50": 0.0005934075000055827}, "faiss": {"build_time": 0.001256444999995665, "build_memory_mb": 2.38671875, "search_avg": 0.00010006684000131827, "search_p50": 9.89245000084793e-05}, "annoy": {"build_time": 0.05992662399998494, "build_memory_mb": 7.890625, "search_avg": 1.7787480000492906e-05, "search_p50": 1.6956999999706568e-05}} -------------------------------------------------------------------------------- /benchmarks/4a6d0f4565cce428bb4b16b40e1b3a22590c2f19-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753837882.873295, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0029585049999951707, "build_memory_mb": 3.39453125, "search_times": [0.000425257999992823, 0.00030598400000769743, 0.00031144399999050165, 0.00033006900000032147, 0.000307237000001237, 0.0002951839999951744, 0.00029786899999351135, 0.0003200809999981402, 0.00028882200000168723, 0.0002884210000075882, 0.00032581899999684083, 0.000317378999994844, 0.00032236199999147175, 0.00029137699999637334, 0.00035933799999554594, 0.0002841629999892348, 0.00028355199999907654, 0.00030978799999559214, 0.00030270799999243536, 0.00030896999999185937, 0.00032324700001140627, 0.00031821700000023156, 0.000317264999992517, 0.00030035399998951107, 0.0003154420000015534, 0.00030930000001205826, 0.0004171829999961574, 0.0003293980000051988, 0.00031411999999875206, 0.0003443969999921137, 0.00032625199999358756, 0.0002940319999993335, 0.0003064039999998158, 0.00031141399999512487, 0.0002945030000063298, 0.0003269229999887102, 0.0003245689999999968, 0.0003157830000048989, 0.0003115939999958073, 0.00033165199999984907, 0.0003104830000069114, 0.000293920999993702, 0.000324729999988449, 0.0003067359999988639, 0.0003212130000065372, 0.00032652299999824663, 0.0002830819999957157, 0.0003176259999975173, 0.00029129700000396497, 0.00031640599999605], "search_avg": 0.00031599781999801734, "search_p50": 0.00031285699999727967, "search_p95": 0.0003526145499940014, "search_p99": 0.00042130124999445684}, "sklearn": {"build_time": 0.0005792670000062117, "build_memory_mb": 0.0, "search_avg": 0.0011232799600009002, "search_p50": 0.0005819270000060328}, "faiss": {"build_time": 0.0010694470000061074, "build_memory_mb": 2.375, "search_avg": 7.217120000007071e-05, "search_p50": 6.97259999995481e-05}, "annoy": {"build_time": 0.062164945000006355, "build_memory_mb": 5.875, "search_avg": 1.636725999929922e-05, "search_p50": 1.5609500003677113e-05}} -------------------------------------------------------------------------------- /benchmarks/5712e55bb312abab9fcac63155e6a832bef1272a-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755479431.65306, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002897416999999791, "build_memory_mb": 3.25, "search_times": [0.0004638799999980847, 0.0002981490000024678, 0.0003300879999983408, 0.0003298990000075719, 0.0003068649999988793, 0.00030985100001146293, 0.0002880299999930003, 0.0003297579999923528, 0.0003130070000025853, 0.0003264019999988932, 0.00032253399999149224, 0.0004428010000054883, 0.00029467299999907937, 0.0003485229999995454, 0.0003429030000035027, 0.00041896499999438674, 0.0003342190000097389, 0.00031790299999556737, 0.0003138480000046684, 0.000311042000006978, 0.00031321800000227995, 0.0003103109999926801, 0.0003180559999975685, 0.0003292569999899797, 0.00029399399998908393, 0.00032912700000053974, 0.0003135569999983545, 0.00033290099999305767, 0.00030422000000385196, 0.0003218940000095927, 0.000327894000008655, 0.0003274529999970355, 0.0003270419999950036, 0.00032618199999490116, 0.0003256109999938417, 0.0002973170000046821, 0.0003145800000083909, 0.00028962199999682525, 0.0002849539999942863, 0.00034369399999434336, 0.00032941700000321816, 0.0002877100000091559, 0.00031046200000162116, 0.00030463100000588383, 0.00032118200000752495, 0.00032087099999955626, 0.00032990800001186926, 0.00029895999999496325, 0.00029193800000371084, 0.0002985300000091229], "search_avg": 0.00032335666000051335, "search_p50": 0.0003194634999985624, "search_p95": 0.00038726609999670795, "search_p99": 0.00045355129000171243}, "sklearn": {"build_time": 0.0006592149999988806, "build_memory_mb": 0.0, "search_avg": 0.001119332060004581, "search_p50": 0.0005827820000092743}, "faiss": {"build_time": 0.0010721189999856051, "build_memory_mb": 2.3984375, "search_avg": 7.974251999996795e-05, "search_p50": 7.36730000028274e-05}, "annoy": {"build_time": 0.06000036900002215, "build_memory_mb": 5.875, "search_avg": 1.6181319999191146e-05, "search_p50": 1.582000001576489e-05}} -------------------------------------------------------------------------------- /benchmarks/61fcbef0f0d64e6f3311b446aba766e2df02cfc9-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764982971.773517, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0024764300000015282, "build_memory_mb": 3.125, "search_times": [0.0004784870000094088, 0.0003588520000050721, 0.0003635319999943931, 0.0003059619999987717, 0.0003021859999989829, 0.0003053529999874627, 0.0002899529999922379, 0.00030649499998958163, 0.00031352700000297773, 0.0003745369999990089, 0.00032451499998842337, 0.00032827500001531007, 0.0003145400000050813, 0.0002874889999873176, 0.0002931200000091394, 0.0003249490000030164, 0.00027756000000067615, 0.00030027299999346724, 0.0003269820000184609, 0.0002934799999820825, 0.0002965950000088924, 0.0003350779999777842, 0.00031122299998287417, 0.0002989500000012413, 0.0004115000000126656, 0.0003166130000238354, 0.0003020959999844308, 0.0003309200000103374, 0.00028980299998693226, 0.00029229799997665395, 0.0002940710000132185, 0.0002992409999933443, 0.00028630700001031073, 0.0002821089999827109, 0.00030847799999378367, 0.0003023060000089117, 0.00029637600002274667, 0.0002817879999952311, 0.0003022960000009789, 0.0002912159999937103, 0.0002853440000194496, 0.00032425699998839264, 0.00031589200000325945, 0.00029377000001318265, 0.0003087980000202606, 0.00030931000000578024, 0.0003096199999959026, 0.00033227299999794013, 0.0003101709999953073, 0.0002954040000133773], "search_avg": 0.0003136834000002864, "search_p50": 0.0003056574999931172, "search_p95": 0.00036958474999693175, "search_p99": 0.00044566337001100453}, "sklearn": {"build_time": 0.0005869090000203414, "build_memory_mb": 0.0, "search_avg": 0.0017785355199981723, "search_p50": 0.0005793105000009291}, "faiss": {"build_time": 0.001085775000007061, "build_memory_mb": 2.25, "search_avg": 7.488530000216543e-05, "search_p50": 7.239600000730206e-05}, "annoy": {"build_time": 0.05904739100000711, "build_memory_mb": 7.80078125, "search_avg": 1.599003999956494e-05, "search_p50": 1.5679000000545784e-05}} -------------------------------------------------------------------------------- /benchmarks/671da3bc90656fb6a2307e2b08368d386c960612-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765252872.862551, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002528939999990598, "build_memory_mb": 3.125, "search_times": [0.000414349999971364, 0.0003144650000308502, 0.00030393500003356166, 0.0004184169999916776, 0.0003254739999647427, 0.00028482900000881273, 0.00029574999996384577, 0.00031511599996747464, 0.00029334499998867614, 0.0002867470000182948, 0.0002908000000161337, 0.0003036640000004809, 0.00030389500000183034, 0.00028775499998801024, 0.0003222179999511354, 0.00030140699999492426, 0.00032309300001998054, 0.00033002300000362084, 0.00029461799999808136, 0.00030386499997803185, 0.0003302939999798582, 0.0003114689999961229, 0.00031476499998461804, 0.00029418600001918094, 0.0003146149999793124, 0.0003144039999938286, 0.0002973320000023705, 0.000321567000014511, 0.00029900599997745303, 0.0002887669999722675, 0.0003095060000077865, 0.0002902400000266425, 0.0002947380000364319, 0.00031035700004622413, 0.0003279700000007324, 0.00030133100000284685, 0.0002974429999653694, 0.0003106970000317233, 0.0003221990000383812, 0.0003079319999983454, 0.0003132020000293778, 0.00031693900001528164, 0.00029534899999816844, 0.00031571599998869715, 0.00029197300000305404, 0.00029356599998209276, 0.0003276489999848309, 0.00030119899997771427, 0.0002988849999496779, 0.0002942360000020017], "search_avg": 0.00031042595999792867, "search_p50": 0.000303915000017696, "search_p95": 0.0003301720499905514, "search_p99": 0.00041642416998172394}, "sklearn": {"build_time": 0.0005412450000221725, "build_memory_mb": 0.0, "search_avg": 0.002215634780000073, "search_p50": 0.0005680505000213998}, "faiss": {"build_time": 0.0010257559999899968, "build_memory_mb": 2.2578125, "search_avg": 7.988561999809462e-05, "search_p50": 7.385700001805162e-05}, "annoy": {"build_time": 0.05894253100001379, "build_memory_mb": 5.875, "search_avg": 1.62619199988967e-05, "search_p50": 1.587949998338445e-05}} -------------------------------------------------------------------------------- /benchmarks/6c86cf1830a8a5978fada8589a571ffdfbe7c908-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753081690.799415, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0024247190001460694, "build_memory_mb": 3.39453125, "search_times": [0.0004187449999335513, 0.0003134769999633136, 0.0002902640001138934, 0.00040116200011652836, 0.00030131500011520984, 0.0003358169999501115, 0.0002892219999921508, 0.0003887589998612384, 0.00027886199995919014, 0.000317494999990231, 0.0003193889999693056, 0.00030065299984016747, 0.00028253900018171407, 0.00025174200004585146, 0.0002542659999562602, 0.00025735199983500934, 0.0002949229999558156, 0.0002727309999954741, 0.00027327199995852425, 0.0002880590000131633, 0.000261780000073486, 0.0002941620000456169, 0.0002850640000815474, 0.000309759999936432, 0.00029694599993490556, 0.0002733430001171655, 0.000300944000173331, 0.0002719500000694097, 0.0002873490000183665, 0.0002952529998765385, 0.00029639499985023576, 0.00029701699986617314, 0.00030003200004102837, 0.0003001030001996696, 0.0002839020000919845, 0.0002873990001717175, 0.00030066299996178714, 0.0002794439999433962, 0.00027841199994327326, 0.0002917969998179615, 0.00030909900010556157, 0.00029258799986564554, 0.0002807160001339071, 0.00036495700010164, 0.00039917799995237147, 0.000310522000063429, 0.0003222639998057275, 0.0002966360000300483, 0.00028383199992276786, 0.00029955099989820155], "search_avg": 0.0003016220399968006, "search_p50": 0.00029508799991617707, "search_p95": 0.00039448944991136157, "search_p99": 0.00041012933002321}, "sklearn": {"build_time": 0.0006126079999830836, "build_memory_mb": 0.0, "search_avg": 0.0014059959999940474, "search_p50": 0.0005828165000139052}, "faiss": {"build_time": 0.0010174070000630309, "build_memory_mb": 2.390625, "search_avg": 7.753269998829637e-05, "search_p50": 7.033649990262347e-05}, "annoy": {"build_time": 0.06046496199996909, "build_memory_mb": 5.875, "search_avg": 1.6203180025513574e-05, "search_p50": 1.557900009174773e-05}} -------------------------------------------------------------------------------- /benchmarks/7fa07ab5003a42db8bb40329bd5cea9f96f5451c-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754922441.076425, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002896189000011873, "build_memory_mb": 3.375, "search_times": [0.0005594729999813808, 0.00036618199999338685, 0.0003225810000060392, 0.0003313880000064273, 0.00032059700001241254, 0.0003061999999829368, 0.0003455130000133977, 0.0003229820000001382, 0.00029460899997957313, 0.0003345529999876362, 0.00030410700000516044, 0.0002999090000059823, 0.00031077899998877, 0.00031113899999013483, 0.00032440399999700276, 0.0002933660000223881, 0.00031430600000703635, 0.0003161889999887535, 0.0003028540000116209, 0.0003318379999939225, 0.0003158389999953215, 0.0002976840000030734, 0.0003241640000055668, 0.00030168200001412515, 0.00028838700001188045, 0.0003035560000057558, 0.0003043469999965964, 0.0002890689999901497, 0.00030154199998833064, 0.00029098200002408703, 0.00028683400000772963, 0.00029819600001701474, 0.000298545999982025, 0.0002886579999881178, 0.00029239500000244334, 0.000327730999998721, 0.00030976700000451274, 0.0002864439999825663, 0.00029806599999915306, 0.0003486800000018775, 0.0003157079999880352, 0.0002969839999877877, 0.00030913599999848884, 0.00031300300000225434, 0.00030730200001016783, 0.0003335019999894939, 0.00029110200000559416, 0.0003171410000106789, 0.00030776300002344215, 0.00030910600000311206], "search_avg": 0.00031532570000024406, "search_p50": 0.0003084345000132771, "search_p95": 0.00034725485000706156, "search_p99": 0.00046476040998726337}, "sklearn": {"build_time": 0.0007348690000128499, "build_memory_mb": 0.0, "search_avg": 0.0010861677999974971, "search_p50": 0.0005908260000069276}, "faiss": {"build_time": 0.0011149670000065726, "build_memory_mb": 2.25, "search_avg": 8.461823999994067e-05, "search_p50": 8.10610000030465e-05}, "annoy": {"build_time": 0.061209440999988374, "build_memory_mb": 5.93359375, "search_avg": 1.6776299999605727e-05, "search_p50": 1.593949998834887e-05}} -------------------------------------------------------------------------------- /benchmarks/9b87bc63eef19246c911982e8048866103feace2-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755566032.309694, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0028908399999920675, "build_memory_mb": 3.25, "search_times": [0.000480037999977867, 0.00030278700000963, 0.00028413100000079794, 0.0003521390000003066, 0.00030301699999313314, 0.00029724600000236023, 0.0003768450000052326, 0.00035211799999501636, 0.00033132000001501183, 0.00035495500000592983, 0.0003176239999902464, 0.00031416699999908815, 0.00033217200001445235, 0.0003045480000025691, 0.0002926870000123927, 0.00034434400001259746, 0.0003262399999925947, 0.00030200499998045416, 0.00030752500001085536, 0.0003116530000113471, 0.0002822190000131286, 0.000304900000003272, 0.00033245200000919795, 0.00029388000001517867, 0.0003134060000036243, 0.0003161219999867626, 0.0002979080000216072, 0.00028803899999729765, 0.00031757400000742564, 0.00030920800000444615, 0.00028708700000379395, 0.0002887199999861423, 0.0003294459999949595, 0.00031621100001189006, 0.0003088480000030813, 0.0003167120000000523, 0.0003195980000043619, 0.0003155199999866909, 0.0003318499999807045, 0.0002978670000004513, 0.0002885090000006585, 0.00030924899999718036, 0.0002859549999811861, 0.00029609399999230845, 0.0003272619999847848, 0.0003251280000142742, 0.00031504000000381893, 0.00030903799998327486, 0.0003302890000043135, 0.00030383799997935057], "search_avg": 0.000316910600000142, "search_p50": 0.0003125295000074857, "search_p95": 0.0003536878000033994, "search_p99": 0.0004294734299912759}, "sklearn": {"build_time": 0.0006790509999916594, "build_memory_mb": 0.0, "search_avg": 0.0011064086600003976, "search_p50": 0.0005852599999940367}, "faiss": {"build_time": 0.0010804409999991549, "build_memory_mb": 2.25, "search_avg": 7.934325999940483e-05, "search_p50": 7.54360000030374e-05}, "annoy": {"build_time": 0.061041985000002796, "build_memory_mb": 6.15234375, "search_avg": 1.674791999789704e-05, "search_p50": 1.609999999629963e-05}} -------------------------------------------------------------------------------- /benchmarks/a4dc1fd86256144815d09120e61727a68fd2e641-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754788559.179917, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0029982050000398885, "build_memory_mb": 3.25, "search_times": [0.0004606960000046456, 0.0003104140000118605, 0.0003102530000091974, 0.00033351700000139317, 0.00029560500001934997, 0.00027928500003326917, 0.0002742649999731839, 0.00032686700001249847, 0.0002858370000353716, 0.0002903360000345856, 0.00032284600001730723, 0.0002926300000467563, 0.00027784200000269266, 0.0003060650000179521, 0.0002812690000268958, 0.00028213999996751227, 0.00028293100001519633, 0.00034004899998762994, 0.00031215699999620483, 0.0002877310000144462, 0.0003005650000318383, 0.00026563900001974616, 0.0002601990000243859, 0.00031124499997758903, 0.0002950850000047467, 0.000302928999985852, 0.0002849560000299789, 0.0003084499999772561, 0.00028374300001132724, 0.00027889399996183784, 0.00031083400000397887, 0.0002856170000313796, 0.0002853560000062316, 0.00027552799997465627, 0.0003016670000306476, 0.0002972679999970751, 0.0002990919999774633, 0.00029690799999571027, 0.00027663999998139843, 0.0002924790000520261, 0.0003114049999908275, 0.00030231800002411546, 0.0002754270000195902, 0.00028487500003393507, 0.0003173869999955059, 0.0002753679999614178, 0.0002723719999835339, 0.0002922790000070563, 0.00029584599997178884, 0.00029197899999644505], "search_avg": 0.0002977017000057458, "search_p50": 0.0002925545000493912, "search_p95": 0.0003305245000063905, "search_p99": 0.0004015789699963077}, "sklearn": {"build_time": 0.0005804109999871798, "build_memory_mb": 0.0, "search_avg": 0.0010480052400032491, "search_p50": 0.0005787974999975631}, "faiss": {"build_time": 0.001044562999993559, "build_memory_mb": 2.30859375, "search_avg": 7.290425999713079e-05, "search_p50": 7.03719999819441e-05}, "annoy": {"build_time": 0.06046321599995963, "build_memory_mb": 5.875, "search_avg": 1.5904460001365804e-05, "search_p50": 1.5249000000494561e-05}} -------------------------------------------------------------------------------- /benchmarks/b358b7f69fcfcedb3dca396bd062f497d8a4e081-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765761038.833453, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025527139999894644, "build_memory_mb": 3.125, "search_times": [0.00046604700003172184, 0.0003938710000284118, 0.0002996530000132225, 0.0003097229999866613, 0.0002819409999688105, 0.0002899529999922379, 0.00030896199996277574, 0.000301456999977745, 0.00030914100000245526, 0.00029523900002459413, 0.00031452199999648656, 0.00029490499997564257, 0.0002804679999712789, 0.000298431000032906, 0.0002790550000213443, 0.00028720000000248547, 0.00033309699995243136, 0.00028309299995044057, 0.0003145620000282179, 0.0003053949999980432, 0.00031687599999941085, 0.000312706000045182, 0.00031264900002270224, 0.00030624600003648084, 0.00031476200001634425, 0.0002901659999565709, 0.000397540999983903, 0.0003650670000183709, 0.00031525299999657364, 0.0003268149999939851, 0.00030210799997121285, 0.00028536700000358906, 0.0002918999999792504, 0.00031349000005320704, 0.0002779229999987365, 0.00028186099996219127, 0.0002892440000437091, 0.0002761700000064593, 0.00030330099997399884, 0.00028526699998110416, 0.00026574999998274507, 0.00028990599997769095, 0.00029257099998858394, 0.0003145409999660842, 0.0002952259999915441, 0.0003079190000221388, 0.0003206229999932475, 0.00029824099999586906, 0.0002925210000057632, 0.0003146720000017922], "search_avg": 0.0003080679399977271, "search_p50": 0.0003017824999744789, "search_p95": 0.0003809092000238933, "search_p99": 0.0004324790600082905}, "sklearn": {"build_time": 0.0005690909999884752, "build_memory_mb": 0.0, "search_avg": 0.0013651801000025899, "search_p50": 0.0005674579999777052}, "faiss": {"build_time": 0.0011538919999907193, "build_memory_mb": 2.25, "search_avg": 7.810274000007667e-05, "search_p50": 7.370399998762878e-05}, "annoy": {"build_time": 0.05961846700000706, "build_memory_mb": 5.9140625, "search_avg": 1.6603080005097582e-05, "search_p50": 1.5674500048135087e-05}} -------------------------------------------------------------------------------- /benchmarks/c3551284e083fb6f8e3177c1b0b0693d9c91a0a5-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754615546.306371, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025313019999941844, "build_memory_mb": 3.25, "search_times": [0.0004407449999916935, 0.00033100999999646774, 0.0003099209999959385, 0.00029469199998288786, 0.0004199770000070657, 0.0003042410000091422, 0.0002816479999978583, 0.0002870069999971747, 0.00028187800000978314, 0.0002613389999908122, 0.00026094900002249233, 0.0003038890000084393, 0.0002807770000003984, 0.00028990000001272165, 0.00030812699998250537, 0.0002943609999874752, 0.0003221030000020164, 0.0003067949999717712, 0.00033107999999515414, 0.0003101810000032401, 0.0002886609999848133, 0.00031110300000136704, 0.0002871080000090842, 0.0003042999999820495, 0.00029518200000211436, 0.00033089900000504713, 0.0002849939999975959, 0.0002907239999956346, 0.0003168840000000728, 0.00028910199998222197, 0.00028533400001151676, 0.0003228650000153266, 0.00027819199999612465, 0.000267229999991514, 0.00028845100001717583, 0.000298502000021017, 0.00031504000000381893, 0.0003023659999996653, 0.00031645300001059695, 0.00027520499997990555, 0.00031170399998359244, 0.0003034679999984746, 0.0002946720000238656, 0.00030087400000411435, 0.00029176600000369035, 0.0003112230000112959, 0.00028466300000218325, 0.0003025160000049709, 0.0003176749999909134, 0.00029919099998210186], "search_avg": 0.00030373933999953805, "search_p50": 0.0003000324999931081, "search_p95": 0.00033104849999574524, "search_p99": 0.00043056867999922586}, "sklearn": {"build_time": 0.000602006999997684, "build_memory_mb": 0.0, "search_avg": 0.0011356530199992676, "search_p50": 0.0005696669999935011}, "faiss": {"build_time": 0.001173507999993717, "build_memory_mb": 2.25, "search_avg": 7.806919999779894e-05, "search_p50": 7.496050000099785e-05}, "annoy": {"build_time": 0.060397916999988865, "build_memory_mb": 5.875, "search_avg": 1.608978000206207e-05, "search_p50": 1.5233499993883015e-05}} -------------------------------------------------------------------------------- /benchmarks/c523cb5d8a5a5bce52e31e6a7ee304356d9ad195-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754270178.050733, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025161080000088987, "build_memory_mb": 3.26953125, "search_times": [0.0004309729999931733, 0.00034180700004071696, 0.00032257099996968464, 0.00031476599997404264, 0.0003319579999470079, 0.0003002490000199032, 0.0002832379999517798, 0.0003129629999421013, 0.0003373789999159271, 0.00030324499994094367, 0.00034915000003366004, 0.0003017819999513449, 0.0002993169999854217, 0.0003152069999714513, 0.0003030640000361018, 0.0004118150000067544, 0.00043197699994834693, 0.00036921699995673407, 0.0004167439999491762, 0.00039578700000220124, 0.00031462599997666985, 0.00031616900002973125, 0.0003107189999127513, 0.0002876759999708156, 0.0002829569999676096, 0.0003257460000440915, 0.00033365100000537495, 0.0003143359999739914, 0.00034644499999103573, 0.00030969700003424805, 0.0003235239998957695, 0.0003490600000759514, 0.0004441679999445114, 0.0004310130000249046, 0.0010928259999900547, 0.000542350000046099, 0.00036572099998011254, 0.0003009609999935492, 0.0003118610000001354, 0.00034634500002539426, 0.00032567699997798627, 0.0003123120000054769, 0.0003244939999831331, 0.0002964919999612903, 0.0003199860000222543, 0.00034367000000656844, 0.0006846049999467141, 0.0006687650000003487, 0.000378614000055677, 0.0008955079999850568], "search_avg": 0.0003814636599872756, "search_p50": 0.0003257115000110389, "search_p95": 0.0006774769999708496, "search_p99": 0.0009961401799876053}, "sklearn": {"build_time": 0.0005984440000474933, "build_memory_mb": 0.0, "search_avg": 0.0018862586599993846, "search_p50": 0.0005830299999729505}, "faiss": {"build_time": 0.001080563000073198, "build_memory_mb": 2.375, "search_avg": 7.329872000127579e-05, "search_p50": 7.190899998477107e-05}, "annoy": {"build_time": 0.06141561600009027, "build_memory_mb": 7.96875, "search_avg": 1.5958340009092352e-05, "search_p50": 1.5258000019002793e-05}} -------------------------------------------------------------------------------- /benchmarks/d025182b9c94d96ff57ca9bd871cd865e0d003a3-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753193880.432402, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002370331999998143, "build_memory_mb": 3.26953125, "search_times": [0.00042944399999100824, 0.00031792499999028223, 0.000330067999996686, 0.0003112930000099823, 0.0003037479999932202, 0.00030631299999583916, 0.00028239899999960016, 0.00030431900000849055, 0.00033975600000246686, 0.0003061430000030896, 0.00031056100000625975, 0.00029898999999034004, 0.0003085879999957797, 0.00028998300000182553, 0.0003372050000081117, 0.0003006230000011101, 0.0002950620000063964, 0.00031707399999447716, 0.0003214919999976473, 0.000305743000012626, 0.00030058299999780047, 0.00030514099999834343, 0.0003074149999946485, 0.0003166420000013659, 0.0003031870000000936, 0.00031139200000041, 0.0003054720000079669, 0.000315881000005902, 0.00032169199999998455, 0.0003055920000036849, 0.000334606000009785, 0.00030385799999521623, 0.0003095290000061368, 0.0003208610000058343, 0.00030757500000788696, 0.0002943510000079641, 0.00029730699999674925, 0.00032294399998988865, 0.0002999219999963998, 0.0003278829999970867, 0.0003264609999860113, 0.0003016640000055304, 0.0003337950000030787, 0.0003180150000048343, 0.0002996910000092612, 0.00029311900000550395, 0.00030995000000189066, 0.0003215219999930241, 0.00030167500000288783, 0.00029016300000250794], "search_avg": 0.00031249234000085835, "search_p50": 0.0003074950000012677, "search_p95": 0.0003360354500088647, "search_p99": 0.0003854968799966228}, "sklearn": {"build_time": 0.0005448889999968287, "build_memory_mb": 0.0, "search_avg": 0.0011114531600003375, "search_p50": 0.0005775310000046829}, "faiss": {"build_time": 0.0010457869999953573, "build_memory_mb": 2.3828125, "search_avg": 7.374165999920024e-05, "search_p50": 7.040650000078585e-05}, "annoy": {"build_time": 0.06011253699999486, "build_memory_mb": 7.75, "search_avg": 1.6816079999557586e-05, "search_p50": 1.5894999997101422e-05}} -------------------------------------------------------------------------------- /benchmarks/e3ddada7f6de3087ed0582f499e4e6372a42e057-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761440751.346404, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002477460999983805, "build_memory_mb": 3.01953125, "search_times": [0.00044906699997682153, 0.00033396300000276824, 0.0003310280000050625, 0.000314326000022902, 0.0002931969999906414, 0.000319065000013552, 0.00029398799998148206, 0.00031543200000783145, 0.00032183000001850814, 0.00030076100000542283, 0.00028743600000780134, 0.0003142460000162828, 0.0003047950000052424, 0.00029193500000701533, 0.00030347599999913655, 0.00030828500001689463, 0.0003165699999954086, 0.0003019129999870529, 0.00030189299999960895, 0.000297334999999066, 0.0003297650000035901, 0.00034236800001963275, 0.00029956899999206144, 0.0003070820000061758, 0.0002873960000044917, 0.000321649999989404, 0.0003226219999987734, 0.000311331000006021, 0.0003172509999842532, 0.0003110499999934291, 0.0003175619999922219, 0.0003257270000176504, 0.0002849310000101468, 0.0002974439999832157, 0.00033333099997889803, 0.000299628999982815, 0.00028195600000913146, 0.00030765400001087073, 0.00027814899999611953, 0.00031762199998297547, 0.00031409600001097715, 0.00030116199999952187, 0.00029796599997666817, 0.0003242749999969874, 0.00030854499999577456, 0.0003079349999950409, 0.0002902710000114439, 0.0003228730000159885, 0.0002866849999918486, 0.00030227400000626403], "search_avg": 0.0003110142400004179, "search_p50": 0.0003081100000059678, "search_p95": 0.00033367859999202667, "search_p99": 0.0003967844899977988}, "sklearn": {"build_time": 0.0006499130000179321, "build_memory_mb": 0.0, "search_avg": 0.0012750215200009053, "search_p50": 0.000578218999990554}, "faiss": {"build_time": 0.0010977679999939483, "build_memory_mb": 2.265625, "search_avg": 8.253152000008867e-05, "search_p50": 7.803550001028725e-05}, "annoy": {"build_time": 0.06012138400001277, "build_memory_mb": 6.0, "search_avg": 1.7464719999793487e-05, "search_p50": 1.6705999996702303e-05}} -------------------------------------------------------------------------------- /benchmarks/f2e68e7713999d88a8f6f763978e3c1450907ffc-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763082244.015408, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002552437999980839, "build_memory_mb": 3.01953125, "search_times": [0.0006355170000063026, 0.0005308520000255612, 0.000494411000005357, 0.0004616020000014487, 0.00045427100002370935, 0.0004598799999939729, 0.0005716989999768884, 0.00048279000000661654, 0.00046275599999034966, 0.0004304819999845222, 0.0004791149999903155, 0.00044284699998797805, 0.0005948410000087279, 0.0004533370000103787, 0.0005174070000180109, 0.00041214000000877604, 0.000479436000006217, 0.00042441300001883064, 0.0005222059999994144, 0.00047294399999486814, 0.0004896039999948698, 0.000409074000003784, 0.00044506099999352955, 0.0003840269999955126, 0.00044685499997854095, 0.00047376499998108557, 0.0005954119999955765, 0.0004569239999909769, 0.00045188400000029105, 0.0004239120000022467, 0.0005690339999944172, 0.0005391569999915191, 0.0003865550000057283, 0.000368416000014804, 0.000325539999977309, 0.0003517869999996037, 0.0003160400000012942, 0.0003208589999985634, 0.00031075999999075066, 0.0003622140000061336, 0.0003537829999800124, 0.0003226930000153061, 0.00032031800000709154, 0.00030488699999864366, 0.00028828899999666646, 0.0002778889999888179, 0.00031269499999098116, 0.00032788199999345125, 0.00031391699999971934, 0.0003133449999950244], "search_avg": 0.0004269104799988099, "search_p50": 0.0004439539999907538, "search_p95": 0.0005844270999944, "search_p99": 0.0006158655500010467}, "sklearn": {"build_time": 0.0006443839999974443, "build_memory_mb": 0.0, "search_avg": 0.0016837771400003022, "search_p50": 0.0005815159999968955}, "faiss": {"build_time": 0.0010621039999989534, "build_memory_mb": 2.265625, "search_avg": 7.529062000457998e-05, "search_p50": 7.395299999757299e-05}, "annoy": {"build_time": 0.05900983899999801, "build_memory_mb": 7.8046875, "search_avg": 1.7524020001928875e-05, "search_p50": 1.6354999999634856e-05}} -------------------------------------------------------------------------------- /benchmarks/04f2c189b22bbc18d2f6d70749cf478f61a6bd46-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753060385.830405, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002714335000007395, "build_memory_mb": 3.26953125, "search_times": [0.00045396800000219173, 0.0003205799999932424, 0.00027874100000246926, 0.00028885999999772594, 0.0002576720000035948, 0.0002678809999991927, 0.00027556499999548123, 0.00029999099999145074, 0.0002870569999942063, 0.00029603299999791943, 0.0002839899999997897, 0.00028197700000021086, 0.0002636529999904269, 0.00026067699999998695, 0.00030143300000418094, 0.0003231139999968491, 0.0003117819999971516, 0.0003186359999887145, 0.0003058719999984305, 0.00028340000000071086, 0.0003032770000004348, 0.0002899620000107461, 0.00028555400000129794, 0.0002892300000070236, 0.00028379999999117445, 0.00028921100000900424, 0.00029276700000480105, 0.0003252169999967691, 0.0002792319999969095, 0.00029195599999809474, 0.0003047289999926761, 0.0002917749999937769, 0.0002982569999971929, 0.0002964739999953281, 0.0003093579999955409, 0.00028748699999425753, 0.0002932780000008961, 0.0003198080000004211, 0.0002880279999999402, 0.0002766570000005686, 0.000288167999997313, 0.00031023999999035823, 0.00030769500000360495, 0.00029422000000067783, 0.00029534200000114197, 0.000262430000006475, 0.0002895410000007814, 0.0002965139999986377, 0.00027908200000581473, 0.0002961030000108167], "search_avg": 0.00029552547999912805, "search_p50": 0.0002918654999959358, "search_p95": 0.00032197369999522604, "search_p99": 0.0003908800099995344}, "sklearn": {"build_time": 0.0007100870000016357, "build_memory_mb": 0.0, "search_avg": 0.0015686092199996438, "search_p50": 0.0005897870000026728}, "faiss": {"build_time": 0.0011355420000001004, "build_memory_mb": 2.375, "search_avg": 8.269918000024746e-05, "search_p50": 7.342250000164086e-05}, "annoy": {"build_time": 0.06455272799999534, "build_memory_mb": 6.015625, "search_avg": 1.6904160000308364e-05, "search_p50": 1.6305500004420992e-05}} -------------------------------------------------------------------------------- /benchmarks/0654aa4fbc3d71a41c9e8b1f642c6308d4cc4bad-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753665269.942203, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002429156999994575, "build_memory_mb": 3.375, "search_times": [0.0004348719999995865, 0.000294319999994741, 0.0003106599999966875, 0.00031694200001197714, 0.00031550899998933346, 0.0003222819999848525, 0.00030200399999102956, 0.00031624299998611605, 0.00029271600001834486, 0.00029709500000763, 0.00030730299999959243, 0.0002931869999827086, 0.00029327800001510695, 0.0003301159999864467, 0.0002955420000034792, 0.00032316400000809153, 0.00031761299999288894, 0.00031441599998061065, 0.00031645100000332604, 0.00030171299999892653, 0.00033853200000066863, 0.00030122199999027544, 0.00029127400000561465, 0.0003371200000117369, 0.000315940000007231, 0.0002914940000096067, 0.0003252669999938007, 0.0003117219999921872, 0.00028352900000072623, 0.0002945300000192219, 0.0003076449999923625, 0.00029950000001122135, 0.00032982600001219, 0.00030417799999327144, 0.0003162200000019766, 0.0003119019999928696, 0.0003341540000008081, 0.00030888699998854463, 0.0003213999999900352, 0.00031047999999600506, 0.0003095179999945685, 0.0002992690000098719, 0.0003089869999826078, 0.0003104290000237597, 0.00030850600001031125, 0.00032228200001327423, 0.00031722200000672274, 0.0003170720000014171, 0.00031536899999196066, 0.0003153190000091399], "search_avg": 0.0003130844200001093, "search_p50": 0.00031119099999443733, "search_p95": 0.00033578530000681893, "search_p99": 0.00038766540000011656}, "sklearn": {"build_time": 0.0005323839999960001, "build_memory_mb": 0.0, "search_avg": 0.0012237414399976388, "search_p50": 0.0005751134999911756}, "faiss": {"build_time": 0.0010338900000022022, "build_memory_mb": 2.25, "search_avg": 7.019138000146086e-05, "search_p50": 6.834749999029555e-05}, "annoy": {"build_time": 0.06036016699999891, "build_memory_mb": 5.93359375, "search_avg": 1.6260119999174094e-05, "search_p50": 1.5588999985993723e-05}} -------------------------------------------------------------------------------- /benchmarks/0a06d8321c9a7f31d996ce4a9683b3f8107c7c45-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1762304753.796531, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002547541000012643, "build_memory_mb": 3.125, "search_times": [0.0004418860000043878, 0.0004298539999751938, 0.00029760600000372506, 0.0003045789999873705, 0.00031406099998321224, 0.0003246969999963767, 0.0003126339999823813, 0.00030948799999919174, 0.00028310900000860784, 0.00032770300001061514, 0.0003028860000142686, 0.0003281030000152896, 0.0003069429999982276, 0.00034515499999088206, 0.00033583699999439887, 0.0003090169999779846, 0.0003175939999948696, 0.0003554740000026868, 0.000318084999975099, 0.000320018000024902, 0.0003317299999991974, 0.0003017029999909937, 0.00031173200000012, 0.00032728100001122584, 0.0003162619999841354, 0.0003028570000083164, 0.00031750300001931464, 0.0002984279999793671, 0.0003354670000135229, 0.00032710199999996803, 0.00030983900001047004, 0.00032260099999348313, 0.0003303880000089521, 0.00032232300000600844, 0.00031521900001507674, 0.0003383529999894108, 0.00032197199999473014, 0.00030284599998253725, 0.00029359800001316216, 0.00034064700000158155, 0.00035678700001540165, 0.0003217510000013135, 0.0003461569999956282, 0.0003084489999878315, 0.0003102100000091923, 0.0003434820000052241, 0.00034895199999596116, 0.00029186599999775353, 0.00033607899999310575, 0.00030498999998940235], "search_avg": 0.00032442605999904116, "search_p50": 0.0003190515000000005, "search_p95": 0.00035619615000967995, "search_p99": 0.00043599031999008275}, "sklearn": {"build_time": 0.0006087380000110443, "build_memory_mb": 0.125, "search_avg": 0.0013842278799984342, "search_p50": 0.0005778900000024123}, "faiss": {"build_time": 0.0011002360000134104, "build_memory_mb": 2.43359375, "search_avg": 7.769081999981609e-05, "search_p50": 7.3603000004141e-05}, "annoy": {"build_time": 0.05976204200001689, "build_memory_mb": 7.7109375, "search_avg": 1.69113600026094e-05, "search_p50": 1.5674000010790223e-05}} -------------------------------------------------------------------------------- /benchmarks/1d3f44d0741942be5926353cfdd5726f990eb4ac-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764637504.806806, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002496694999990723, "build_memory_mb": 3.14453125, "search_times": [0.0004503299999782939, 0.00029379800002971024, 0.00030164200001081554, 0.000309967999953642, 0.0002926860000229681, 0.0002901010000186943, 0.0003186449999930119, 0.00031378500000300846, 0.00030695200001673584, 0.0003106999999999971, 0.00032295300002260774, 0.00033452299999225943, 0.00028958999996575585, 0.00030291399997395274, 0.00030192899998837675, 0.00030488799995964655, 0.000321069000051466, 0.00030826500000102897, 0.00027890000001207227, 0.00030326499995680933, 0.00027703699998937736, 0.0002881969999748435, 0.00027509300002748205, 0.00029989899996962777, 0.0003376089999846954, 0.0003054289999795401, 0.0003330710000000181, 0.0003047280000032515, 0.0002969140000459447, 0.000309898000011799, 0.0002993069999774889, 0.0003177629999981946, 0.0003305960000261621, 0.0002973040000142646, 0.000289579999957823, 0.0002984390000051462, 0.00029760400002487586, 0.000298787000019729, 0.00028983999999354637, 0.0003144660000202748, 0.00030197299997780647, 0.00029833700000381214, 0.0003246960000069521, 0.0003033659999687188, 0.00028779699999859076, 0.00028352900000072623, 0.0003023340000254393, 0.0002844699999968725, 0.00027709599999070633, 0.00030980799999724695], "search_avg": 0.0003058373999988362, "search_p50": 0.0003021535000016229, "search_p95": 0.0003338695999957508, "search_p99": 0.0003950967099814304}, "sklearn": {"build_time": 0.0006122509999499925, "build_memory_mb": 0.0, "search_avg": 0.0012974038999948334, "search_p50": 0.0005873599999972612}, "faiss": {"build_time": 0.0011246469999832698, "build_memory_mb": 2.25, "search_avg": 7.692576000067674e-05, "search_p50": 7.049600000641476e-05}, "annoy": {"build_time": 0.059394303999965814, "build_memory_mb": 7.75390625, "search_avg": 1.598319999175146e-05, "search_p50": 1.5257999990581084e-05}} -------------------------------------------------------------------------------- /benchmarks/1f092eba61af6517ab45781a8589a864af593efa-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1756342807.806713, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002287736999988965, "build_memory_mb": 3.125, "search_times": [0.00044762900000705486, 0.00034022799999888775, 0.0003091499999925418, 0.00029536399999585683, 0.000315081000010764, 0.0003134269999947037, 0.00030495199999336364, 0.0003203809999945406, 0.00033143199999585704, 0.00029761800000471794, 0.00030108400000017355, 0.0003201979999971627, 0.0003107430000000022, 0.00033378599999878134, 0.00031669300000203293, 0.0003133069999989857, 0.0003572389999959569, 0.0002998020000006818, 0.0002971970000089641, 0.00028968300000542513, 0.0003156810000035648, 0.00033679100000938433, 0.00030347899999583205, 0.0003157519999916758, 0.0003008730000004789, 0.0002947530000056986, 0.00032898700000316694, 0.00031552200000817265, 0.00030072299999517327, 0.0003157010000052196, 0.0003076269999979786, 0.0003148499999952037, 0.0003253189999981032, 0.0003095399999892834, 0.0002919470000080082, 0.00028699799999287734, 0.0003331850000023451, 0.0003036789999981693, 0.00030500199999039523, 0.00031490000000644613, 0.0002984289999972134, 0.000304391000000237, 0.0003161930000032953, 0.0003092599999945378, 0.00028600499999242857, 0.0002897330000024567, 0.0003098910000005617, 0.0002968759999930626, 0.00028887099999508337, 0.00032320500000082575], "search_avg": 0.0003131831399994667, "search_p50": 0.00030971549999492254, "search_p95": 0.0003386813500036112, "search_p99": 0.00040333790000161667}, "sklearn": {"build_time": 0.000593292000004908, "build_memory_mb": 0.125, "search_avg": 0.0012065547800000332, "search_p50": 0.0005660060000067801}, "faiss": {"build_time": 0.0010335079999919117, "build_memory_mb": 2.3984375, "search_avg": 7.265046000185294e-05, "search_p50": 6.97010000010323e-05}, "annoy": {"build_time": 0.06087526899999318, "build_memory_mb": 8.03515625, "search_avg": 1.672541999994337e-05, "search_p50": 1.5714499994601283e-05}} -------------------------------------------------------------------------------- /benchmarks/1f2a0840aefd9ffb69999a934d5ae4340417e71a-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1755047233.452554, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0023269769999956225, "build_memory_mb": 3.375, "search_times": [0.00042396500001018467, 0.0003195989999937865, 0.00031328700001154175, 0.0002948730000014166, 0.0002852149999910125, 0.0002876289999846904, 0.00028392300001200965, 0.00030917000000840744, 0.0002978379999944991, 0.0003166740000040136, 0.0002861970000083147, 0.00030987099998469603, 0.00030488199999467724, 0.0002904549999982464, 0.00029528300001402386, 0.000287428999996564, 0.0003155820000131371, 0.00028905199999940123, 0.00030758599999103353, 0.00036892199997851094, 0.0003055619999940973, 0.00028479400000946953, 0.00029633500000159074, 0.0002865069999984371, 0.0003037700000163568, 0.00030579299999544673, 0.0003187279999963266, 0.00030189599999630445, 0.0002900539999757257, 0.00031310700001085934, 0.0003054930000132572, 0.000293510000005881, 0.00034673999999768057, 0.00030077400001005117, 0.00029141699999968296, 0.00029801900001302783, 0.000292869000020346, 0.0003107730000238007, 0.00028504400000883834, 0.00031564200000389064, 0.00032042099999785023, 0.0002990309999972851, 0.0002893229999756386, 0.0002949529999796141, 0.0003092700000024706, 0.0002919679999990876, 0.0002988100000038685, 0.0003051829999947131, 0.0003250489999970796, 0.0003012850000061462], "search_avg": 0.0003053910400006998, "search_p50": 0.0003010295000080987, "search_p95": 0.0003369790499974101, "search_p99": 0.00039699392999466445}, "sklearn": {"build_time": 0.0005497209999987263, "build_memory_mb": 0.125, "search_avg": 0.0010474047599984715, "search_p50": 0.0005792114999962905}, "faiss": {"build_time": 0.0010257039999999051, "build_memory_mb": 2.30078125, "search_avg": 7.110071999932188e-05, "search_p50": 6.839299999228388e-05}, "annoy": {"build_time": 0.06062612600001671, "build_memory_mb": 6.0, "search_avg": 1.698484000030476e-05, "search_p50": 1.5423999997210558e-05}} -------------------------------------------------------------------------------- /benchmarks/2bc79d81061bb11407514570fe7065cc9ceb7caf-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1761527227.838966, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025064879999945333, "build_memory_mb": 3.0, "search_times": [0.0004976950000354918, 0.00031197900000279333, 0.00031365199993160786, 0.0003354729999500705, 0.00031530599994766817, 0.00032312100006492983, 0.0003398820000484193, 0.00030232199992497044, 0.0002822149999701651, 0.0003086240000129692, 0.00029680199997983436, 0.0003051569999570347, 0.00029011899994202395, 0.0003084830000261718, 0.00029679199997190153, 0.0003077210000128616, 0.00030962499999986903, 0.00029894599992985604, 0.00032064599997738696, 0.0003267770000547898, 0.0003163280000535451, 0.0002979729999879055, 0.0003218780000224797, 0.00033385100005034474, 0.00030143999993015314, 0.00034033200006433617, 0.0002982349999456346, 0.0003067300000338946, 0.00031202999991819524, 0.000313492999907794, 0.0003073409999387877, 0.0002988850000065213, 0.0003442800000357238, 0.0003116499999578082, 0.0003088039999283865, 0.00032840999995187303, 0.00030889399999978195, 0.00031222000006891903, 0.0003425270000434466, 0.00030873400010023033, 0.0003282400000443886, 0.00032559400005993666, 0.0003080320000208303, 0.00030536700000993733, 0.00032471300005454395, 0.0003364849999343278, 0.00032738900006279437, 0.0003395009999849208, 0.00032806000001528446, 0.00033365000001595035], "search_avg": 0.00031924805999778983, "search_p50": 0.00031212499999355714, "search_p95": 0.0003415392500528469, "search_p99": 0.0004225216500356052}, "sklearn": {"build_time": 0.0006002860000080545, "build_memory_mb": 0.0, "search_avg": 0.0012947754000038002, "search_p50": 0.0005704349999859915}, "faiss": {"build_time": 0.0010782930000914348, "build_memory_mb": 2.3984375, "search_avg": 7.545416000084515e-05, "search_p50": 7.172350001383165e-05}, "annoy": {"build_time": 0.0603215779999573, "build_memory_mb": 7.5, "search_avg": 1.5622579996943387e-05, "search_p50": 1.5007499996499973e-05}} -------------------------------------------------------------------------------- /benchmarks/2d2b68b70badcfc6be9b10ebfcc565b2c3ec5f46-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1754874786.997221, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002424856000004638, "build_memory_mb": 3.375, "search_times": [0.0004049420000455939, 0.00030688800001144045, 0.0002780340000185788, 0.00029004599997506375, 0.0003118669999935264, 0.00030741900002340117, 0.00028276199998344964, 0.00029183999998849686, 0.00033069199997726173, 0.00028905300001724754, 0.00030759899999566187, 0.00031903099994678996, 0.0002745770000274206, 0.0002832030000377017, 0.0003052140000363579, 0.000309963000006519, 0.0002837939999835726, 0.00032531199997265503, 0.0002988119999827177, 0.000281619999952909, 0.00029605700001411606, 0.00030872100001033687, 0.00028648900001826405, 0.00028008699996462383, 0.00029749000003675974, 0.0002978699999971468, 0.0002846449999651668, 0.0002855579999732072, 0.00029517600000872335, 0.00029154800000696923, 0.0003143510000427341, 0.000319181000008939, 0.0002950550000377916, 0.00028163999996877465, 0.00030070599996179226, 0.0002976910000143107, 0.0002887939999709488, 0.0002905559999817342, 0.0003287079999836351, 0.000298632000010457, 0.0003032399999938207, 0.0003041620000203693, 0.00028832300000658506, 0.00031452199999648656, 0.0003828010000006543, 0.0002983609999773762, 0.0002851369999916642, 0.00031700700003511884, 0.00028716099996017874, 0.0002920700000004217], "search_avg": 0.00030188813999870945, "search_p50": 0.0002975905000255352, "search_p95": 0.0003297991999801297, "search_p99": 0.00039409291002357345}, "sklearn": {"build_time": 0.0005459370000266972, "build_memory_mb": 0.0, "search_avg": 0.0010292183599938198, "search_p50": 0.0005644164999978329}, "faiss": {"build_time": 0.001053792999982761, "build_memory_mb": 2.30859375, "search_avg": 7.448660000136442e-05, "search_p50": 7.152499998142048e-05}, "annoy": {"build_time": 0.06045739500001446, "build_memory_mb": 5.875, "search_avg": 1.6498360001833133e-05, "search_p50": 1.5644499995914884e-05}} -------------------------------------------------------------------------------- /benchmarks/484858a9b37347b69e2e284aaf66567a10b3ab79-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1764119056.068901, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025692270000092776, "build_memory_mb": 3.14453125, "search_times": [0.0004826809999940451, 0.00043345000000272194, 0.000338201000005256, 0.00035657600000149614, 0.0003523379999990084, 0.0003367989999958354, 0.00030544999998483036, 0.000316360999988774, 0.00029437000000598346, 0.00028279800000063915, 0.0003144369999859009, 0.00032264299997564194, 0.00030379699998661636, 0.000328813999999511, 0.0003097480000064934, 0.0003216799999847808, 0.00031476799998131355, 0.00032038899999520254, 0.0002922360000070512, 0.0003056700000172441, 0.0002948100000139675, 0.0003066529999955492, 0.00029071299999827716, 0.0003065919999869493, 0.0003124330000048303, 0.00030522999998083833, 0.00032764200000201527, 0.0003086260000202401, 0.00028483200000550823, 0.0002993490000164911, 0.0003078549999884217, 0.00031159100001332263, 0.00030210500000293905, 0.00030548999998813997, 0.0003093570000203272, 0.000312984000004235, 0.00032991599999832033, 0.0003034570000011172, 0.00031813399999691683, 0.00034131700002149046, 0.00030770399999369147, 0.00032127000000059525, 0.0003136960000063027, 0.00029281700000183264, 0.00031282400001941824, 0.0003200179999964803, 0.0003052600000046368, 0.00028887899998153443, 0.000300821999985601, 0.0003149879999853056], "search_avg": 0.0003178113999990728, "search_p50": 0.000310669500009908, "search_p95": 0.0003546689000003766, "search_p99": 0.0004585578099982967}, "sklearn": {"build_time": 0.0006768439999973452, "build_memory_mb": 0.0, "search_avg": 0.0012912789200026963, "search_p50": 0.0005916894999984379}, "faiss": {"build_time": 0.0011083089999885942, "build_memory_mb": 2.25390625, "search_avg": 7.70934400020451e-05, "search_p50": 7.107250000615295e-05}, "annoy": {"build_time": 0.06016251200000511, "build_memory_mb": 6.125, "search_avg": 1.5936360000523564e-05, "search_p50": 1.547349999952985e-05}} -------------------------------------------------------------------------------- /benchmarks/5453da0f79a7c02106cabc5c643b026b2b0bc7bf-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765674797.993923, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025185519999979533, "build_memory_mb": 3.125, "search_times": [0.0004691249999950742, 0.00028987000001734486, 0.0003031149999799254, 0.00029433800000333576, 0.00029029099999888786, 0.0002832469999987097, 0.0002733490000252914, 0.00028912600001262945, 0.0002726780000159579, 0.0002678290000233119, 0.0002910420000148406, 0.00028184600000713544, 0.00027527299999974275, 0.0002630589999910171, 0.00028331800001524243, 0.000288517999990745, 0.0002906120000147894, 0.00032622800000581265, 0.0002855209999950148, 0.0003044769999860364, 0.00029704400000696296, 0.0003109589999894524, 0.00028206499999328116, 0.00027577399998790497, 0.00030361600002493105, 0.0003028339999957552, 0.0002763850000064849, 0.0003127030000200648, 0.00029265499998132327, 0.00029659299997319977, 0.0002769060000105128, 0.00029275599999323276, 0.0002922749999925145, 0.0002766250000263426, 0.00031053800000790943, 0.0002751219999765908, 0.00029711300001622476, 0.00027315899998825444, 0.00029689300001223273, 0.00029056200000354693, 0.0002801020000049448, 0.00029700300001422875, 0.0003021530000069106, 0.0003088449999779641, 0.00030906599999980244, 0.00029345699999794306, 0.0002928049999866289, 0.00029852599999458107, 0.0003012509999962276, 0.00029589099997906487], "search_avg": 0.0002946907600011173, "search_p50": 0.0002924649999869189, "search_p95": 0.0003119182000062892, "search_p99": 0.0003991054700003357}, "sklearn": {"build_time": 0.0005785170000081052, "build_memory_mb": 0.0, "search_avg": 0.0014028746599990427, "search_p50": 0.0005836224999882234}, "faiss": {"build_time": 0.001032433999995419, "build_memory_mb": 2.296875, "search_avg": 7.49775200000613e-05, "search_p50": 7.117199999129298e-05}, "annoy": {"build_time": 0.06080908300000942, "build_memory_mb": 6.0078125, "search_avg": 1.6277920001925848e-05, "search_p50": 1.598000000058164e-05}} -------------------------------------------------------------------------------- /benchmarks/5a3d7a1d3565af881f8a20d0361c6df22258c1d8-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765069912.400752, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025361309999993864, "build_memory_mb": 3.25, "search_times": [0.00047383699995862116, 0.00036842100001877043, 0.0006203419999906146, 0.00042106900002636394, 0.0005762800000184143, 0.0005940820000205349, 0.0005616320000285668, 0.0005056880000324782, 0.0005081920000407081, 0.0002884400000198184, 0.0002968259999533984, 0.00028990300000941716, 0.00033627999999907843, 0.00029490299999679337, 0.00028757900003029135, 0.0003115730000331496, 0.00029075499998043597, 0.0003174319999743602, 0.0003115139999749772, 0.00030685499996252474, 0.0002895330000001195, 0.00035278100000368795, 0.000294632000020556, 0.0002861669999560945, 0.000331972000026326, 0.0003119049999895651, 0.00030963000000383545, 0.00028588600002876774, 0.0003078469999877598, 0.0002977279999640814, 0.0003146489999608093, 0.00031539000002567263, 0.0002943420000178776, 0.00029757799995877576, 0.00030354900002294016, 0.00032379600003196174, 0.0002918560000466641, 0.00028952200000276207, 0.00031877800000756906, 0.0003044709999926454, 0.00028514400003132323, 0.0003214719999959925, 0.00031230499996581784, 0.00028518400000621114, 0.00030453099998339894, 0.0002980779999575134, 0.0002953430000047774, 0.0002803859999858105, 0.00031325699995932155, 0.0003182259999903181], "search_avg": 0.00034195081999996543, "search_p50": 0.0003087384999957976, "search_p95": 0.0005696884000229829, "search_p99": 0.0006074746000052755}, "sklearn": {"build_time": 0.0008020520000400211, "build_memory_mb": 0.0, "search_avg": 0.0012131737400045495, "search_p50": 0.0005767300000059095}, "faiss": {"build_time": 0.0010611480000193296, "build_memory_mb": 2.25390625, "search_avg": 8.260408000296593e-05, "search_p50": 7.447900000556729e-05}, "annoy": {"build_time": 0.05765336000001753, "build_memory_mb": 6.0, "search_avg": 1.5913759996237785e-05, "search_p50": 1.4787000026217356e-05}} -------------------------------------------------------------------------------- /benchmarks/64ae62be1cdd31834d128a01815461316dcbdb6d-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1765426258.012258, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0026282179999839173, "build_memory_mb": 3.25, "search_times": [0.0004569660000015574, 0.00028572599998710757, 0.00029483200000868237, 0.0003287859999829834, 0.0003378530000190949, 0.0003076060000068992, 0.0003314900000077614, 0.0003149200000223118, 0.0003011439999909271, 0.0003232250000166914, 0.00031772500000215587, 0.0003033080000136579, 0.00029451200001062716, 0.00030717499998900166, 0.00031213399998364366, 0.0003181959999949413, 0.00031834600000024693, 0.00029497200000605517, 0.00028807000001052074, 0.0003148600000031365, 0.0003177050000147119, 0.0002954830000021502, 0.00029186599999775353, 0.0003202390000183186, 0.00031156399998621964, 0.00030503199999998287, 0.00033319400000664245, 0.0003255899999885514, 0.0003096890000051644, 0.0003205799999932424, 0.00032598100000313934, 0.00031048100001385137, 0.00033585900001753544, 0.0003115430000093511, 0.00031751399998825036, 0.0003080269999884422, 0.0002872780000018338, 0.00029356000001712346, 0.0003045100000065304, 0.0003282450000199333, 0.0002956440000048133, 0.00031384799999045754, 0.0003359189999798673, 0.0003102410000224154, 0.0002813069999945128, 0.00030772599998840633, 0.0003039799999839943, 0.0003202299999998104, 0.0003124549999995452, 0.0003011040000160392], "search_avg": 0.00031376480000233186, "search_p50": 0.00031155349999778537, "search_p95": 0.00033589199999681794, "search_p99": 0.00039860063001015053}, "sklearn": {"build_time": 0.0005756179999991673, "build_memory_mb": 0.0, "search_avg": 0.0016661835399997926, "search_p50": 0.0005799110000026531}, "faiss": {"build_time": 0.0010661360000199238, "build_memory_mb": 2.25, "search_avg": 7.496364000019185e-05, "search_p50": 7.13390000015579e-05}, "annoy": {"build_time": 0.06055736199999728, "build_memory_mb": 6.04296875, "search_avg": 1.618449999966742e-05, "search_p50": 1.536899999621255e-05}} -------------------------------------------------------------------------------- /benchmarks/670abaf2c1de80a78b216fe17facf57e4f3709a7-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1753924238.920924, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.002523120000006429, "build_memory_mb": 3.51953125, "search_times": [0.0004502060000106667, 0.0002986410000005435, 0.00029724899999905574, 0.00029953199998544733, 0.00030941100001768973, 0.0003016260000094917, 0.0003321649999747933, 0.0003117550000126812, 0.0002936119999787934, 0.000328568000014684, 0.0002937919999794758, 0.00031705500001066866, 0.0003060250000146425, 0.0003093610000064473, 0.0003222759999914615, 0.0003181870000048548, 0.0003201609999905486, 0.0003009559999895828, 0.00032651300000452466, 0.0003231480000067677, 0.00031718600001795494, 0.00032235599999808073, 0.0003247000000214939, 0.00032165499999337044, 0.0002977700000030836, 0.000342212999981939, 0.000316685000001371, 0.00030569500000865446, 0.0003146720000017922, 0.0003045420000091781, 0.00031993099997862373, 0.00032563199999913195, 0.0004194079999990663, 0.00032355799999095325, 0.0003135789999930694, 0.0003083400000036818, 0.0003071169999770973, 0.00032805699999016724, 0.000301676999981737, 0.00030481300001383715, 0.0003027489999851696, 0.0003323239999986072, 0.00031764599998496124, 0.0003027589999931024, 0.00032468000000562824, 0.0003085200000043642, 0.0003080390000036459, 0.000345388999988927, 0.00029806999998527317, 0.00029573599999821454], "search_avg": 0.00031831473999829993, "search_p50": 0.0003141254999974308, "search_p95": 0.0003439597999857824, "search_p99": 0.00043511498000498245}, "sklearn": {"build_time": 0.0006945050000126685, "build_memory_mb": 0.0, "search_avg": 0.0015355921200000467, "search_p50": 0.0005868430000077751}, "faiss": {"build_time": 0.001180609000016375, "build_memory_mb": 2.43359375, "search_avg": 8.060209999882773e-05, "search_p50": 7.879300000013245e-05}, "annoy": {"build_time": 0.061580883999994285, "build_memory_mb": 7.75390625, "search_avg": 1.689833999989787e-05, "search_p50": 1.579950000518693e-05}} -------------------------------------------------------------------------------- /benchmarks/7c145061cb614715e223e0f1d4f7a34e9f119bd3-small.json: -------------------------------------------------------------------------------- 1 | {"timestamp": 1763600551.268559, "dataset": "small", "config": {"N": 10000, "D": 64, "k": 10}, "repeats": 50, "rust_annie": {"build_time": 0.0025420329999974456, "build_memory_mb": 3.01953125, "search_times": [0.0004602770000019518, 0.0003011809999975412, 0.0003091570000037791, 0.00030400599999325095, 0.00029901700000323217, 0.00032734999999206593, 0.0003161890000171752, 0.0003014610000207085, 0.0003793060000134574, 0.0003771419999907266, 0.00028663399999118155, 0.000335704999997688, 0.0002939570000251024, 0.00032022599998526857, 0.00032602699999983997, 0.0003032040000050529, 0.000300570000007383, 0.00032633000000714674, 0.0003292629999975816, 0.00030861499999446096, 0.00034149500001490196, 0.000297944000010375, 0.00028951900000606656, 0.00031631900000661517, 0.00032060600000249906, 0.0003236120000167375, 0.0002876359999959277, 0.0003281510000192611, 0.00031743900001401926, 0.0004176479999955518, 0.00033569499998975516, 0.00031057800001121905, 0.00030730100002074323, 0.00032432400001880524, 0.000305749000006017, 0.00031455499998855885, 0.0003074029999936556, 0.00029355600000258164, 0.0002888280000092891, 0.00030421700000715646, 0.0002809230000195839, 0.0002915829999778907, 0.0003068720000101166, 0.0003221300000006977, 0.00029299600001309045, 0.000322481000011976, 0.0003131230000121832, 0.00029190300000436764, 0.00031582799999796407, 0.0003100769999946351], "search_avg": 0.0003177221600043367, "search_p50": 0.0003103275000029271, "search_p95": 0.00037833220000322855, "search_p99": 0.00043938878999881574}, "sklearn": {"build_time": 0.0005881650000105765, "build_memory_mb": 0.0, "search_avg": 0.0012861531600015042, "search_p50": 0.0005659735000023147}, "faiss": {"build_time": 0.0010459179999884327, "build_memory_mb": 2.3984375, "search_avg": 7.466260000001057e-05, "search_p50": 7.085700001141504e-05}, "annoy": {"build_time": 0.05917344899998511, "build_memory_mb": 6.0, "search_avg": 1.6333179996763646e-05, "search_p50": 1.5379000004145382e-05}} --------------------------------------------------------------------------------