Skip to main content

Embedded, ultra-fast vector database with HNSW indexing built in Rust.

Project description

🚀 FastVect

FastVect is an ultra-high-performance, memory-optimized embedded vector storage and search engine designed in Rust and compiled into native, zero-dependency Python binaries.

By eliminating server-side hops, HTTP/gRPC network overhead, and heavy serialization bottlenecks, FastVect runs directly inside your active Python process memory. Thanks to pre-compiled binary wheels hosted on PyPI, it installs instantly on Windows, Linux, and macOS without requiring a local Rust toolchain or cargo environment.


📊 Performance Benchmark Ledger

The following metrics were captured under rigorous architectural stress-testing on an Intel Core i7-10750H CPU (5,000 Entities, 128-Dimension, Cosine Metric, distributed across isolated tenant spaces):

Phase Evaluation Matrix Throughput / Velocity Amortized Latency
📥 Ingestion Bulk Transactional Upsert 29,042.77 upserts/sec 0.1722 seconds (Total)
🔍 Search (Single) Sequential Graph Traversal 19,117.29 queries/sec 0.0340 ms (~34.0 μs)
🏎️ Search (Batch) Multi-Threaded Rayon Engine 127,475.43 queries/sec 0.0078 ms (~7.8 μs)
💾 Save State Postcard Binary Serialization Zero-Copy Disk Commit 5.70 ms (Total Space)
🔄 Rehydration Memory Hot-Swap Reload Exclusive State Hydration 8.24 ms (Total Time)

📈 Benchmark Insights

  • The 127K QPS Record: By passing query matrices in bulk via .batch_search(), FastVect drops into a highly optimized Rust worker pool managed by Rayon. This completely bypasses Python's GIL (Global Interpreter Lock) and saturates all available CPU cores.
  • Microsecond Latency: Swapping heap-allocated visit trackers with an $O(1)$ stack-like flat Vec<bool> allocation within the HNSW traversal loop reduces search latency down to an astonishing 7.8 microseconds per query.

🛠️ Key Architectural Innovations

  • GIL-Free Data Parallelism: Parallel iterators seamlessly map concurrent graph traversal lookups directly to bare-metal hardware threads.
  • Contiguous Graph Memory: Replaced pointer-heavy vertex representations with contiguous array blocks, reducing heap fragmentation and maximizing L1/L2 cache locality.
  • Single-Stage Multi-Tenancy: Filters properties during the graph routing phases instead of relying on post-query vector truncation, keeping recall precision at 100%.

📦 Installation

FastVect provides pre-compiled binaries for major operating systems and Python versions. No local compiler or Rust setup is needed:

pip install fastvect

🚀 Quickstart Guide

1. Ingestion & Multi-Tenant Search

import fastvect

# Initialize a production-grade embedded storage workspace
storage = fastvect.VectorStorage()

# Upsert coordinates paired with structural metadata payloads
storage.upsert(
    point_id=1,
    vector=[0.12, -0.43, 0.84, ..., 0.09],  # 128-dimensional list
    payload={
        "tenant_id": "tenant_alpha",
        "status": "active",
        "index_marker": 500
    }
)

# High-speed single search query with active pre-filtering
results = storage.search(
    query_vector=[0.10, -0.40, 0.80, ..., 0.05],
    limit=10,
    metric="cosine",
    tenant_id="tenant_alpha"
)
print(f"Top-K Matches: {results}")

2. Multi-Core Batch Search Blast

To replicate the 127K QPS benchmark, aggregate your query vectors and route them concurrently through the parallel engine:

# A nested list containing hundreds of raw analytical vectors
query_batch = [[0.1, -0.2, ...], [0.4, 0.5, ...], [-0.3, 0.1, ...]]

batch_results = storage.batch_search(
    query_vectors=query_batch,
    limit=5,
    metric="cosine",
    tenant_id="tenant_alpha"
)

3. High-Speed Persistence

# Commit state snapshot onto localized physical tracks instantly via Postcard
storage.save("fastvect_snapshot.bin")

# Rehydrate database states into a clean empty instance
new_storage = fastvect.VectorStorage()
new_storage.load("fastvect_snapshot.bin")

🛡️ License

FastVect is open-source software licensed under the MIT License. Hardened for mission-critical, ultra-low latency embedding retrieval pipelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fastvect-1.0.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

fastvect-1.0.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (310.8 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

fastvect-1.0.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (317.5 kB view details)

Uploaded CPython 3.15tmanylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318.9 kB view details)

Uploaded CPython 3.15manylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (317.5 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (309.1 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

fastvect-1.0.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (310.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64

fastvect-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (321.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (313.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

fastvect-1.0.1-cp312-cp312-win_amd64.whl (187.8 kB view details)

Uploaded CPython 3.12Windows x86-64

fastvect-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (321.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (312.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

fastvect-1.0.1-cp312-cp312-macosx_11_0_arm64.whl (274.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fastvect-1.0.1-cp312-cp312-macosx_10_12_x86_64.whl (292.7 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fastvect-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

fastvect-1.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (310.5 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

File details

Details for the file fastvect-1.0.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b58d865ddf3d18e7e34a0c04494b120badb1c87e05ab8f7a0e1d8144bb311943
MD5 35d4272d24abcb0af7fdda3c027db468
BLAKE2b-256 fa40a9794f6de2a0c86df5aa9490098584220bd6f8c54e83ce39959138746f2e

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 22355f2417fa296b33a1ea848aca6269f1e0a24b96359077c9f759eed7524df4
MD5 748b871b99bcad9ae1d9817273c1b8ff
BLAKE2b-256 90048652a7652275f1be9fa6b8cf34d0455d9409943e6eb94f03bb9943f3c4e1

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01488aa71b3e7d0215d571e6512488ce405ce9e16d5372e0b171b71192bc6fa8
MD5 c0d6e1221375ae95b6fad4571a55e1a4
BLAKE2b-256 cc91f027b53aa7215bac2bbb0b4c708535c029eda3798f169aa95e18b718648b

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp315-cp315-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7edd92258562b702e0420f789d06ec851ceeb868e5a78a636c556603a8a8c4e
MD5 5ea511b4e64133ea12b653f0b530dd4a
BLAKE2b-256 2657bf5f7cfc6224ce0c9924f2ef53407851977a4b18507e64ed481a612ec042

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1040668fae8900839db6d39b9b9d319397139f5e6e91e6f2b50bdb0147888975
MD5 c95276bb7a7bdc2e559fdf3bdd60acca
BLAKE2b-256 dff25dfae9e0200b9477d14342608736bba313846be60216cfab482b5fbcb947

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2a3229326b361b02cace3c0609713c3d506146cfd7b1821e88b3c5fc47615422
MD5 8a4963111a195d345ed4639a3b48e444
BLAKE2b-256 78152419a4cb106369a008abd1e4a87fe6a9dce7297fe26ac60f954bc974a906

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 42020e15f43fba52fed831b50f5debb596681bd08512a65748db39a93339e875
MD5 621831e11b195e4aa3a81798d0613da0
BLAKE2b-256 a79ee4aa4240e3e958c4f1a1917335a9c404d408ce98e8f389e2e1053cbba380

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 880ea6884bcdfbe1a734c00de6e99e404b6bda5cf5f01cd8e5369266cb12d911
MD5 722258a7dbec1ed28da45cbfe2193724
BLAKE2b-256 5f6a96620573af49357d3ac6c836475238109df9cc7811f4a12a8f78be9d74a3

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8132828739bd64b4b361e3f3a4d93ffb9f1a869ab7cdde659f5a443e96e413c4
MD5 b058edff0e1df957ea1dba960d729a88
BLAKE2b-256 a201221d5e1f44455529fe5a268c397365213684c71560178ff260324c88eb7a

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 418131886b0c371bf1192952d8789604c78d2ba41bd8dc4cedf76c519812d451
MD5 6403f61bd609d4600052ac2470cafa20
BLAKE2b-256 8544aec40d7e57bcd81ec298bca9d82363ffe4b81948143e88cf27340a93b758

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fastvect-1.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 187.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.14.0

File hashes

Hashes for fastvect-1.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 aa51dd4d7164d8d621095d07e1801c523c0a64abfd625f5f9d1820aba7ba99d6
MD5 f326a8802484768d83951c05fe19198e
BLAKE2b-256 56540f859b42cc5f09a2be84a50ded1626348fa01999438f857512d6ec5570dd

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5170a93fd5a3572bd9b3b2dfe493ec9f23044f013a2cdd1668a01ac3f24e802
MD5 233081acfa4dc38d9fe41b0afc367f14
BLAKE2b-256 b9e05e12a7e9d1b7e2623017251a3bae41ace4e810c9453c4ac65ddb03200feb

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 de59259b337c778e9fe9d85c380f655c0f6829725631f47918c9643243a5a900
MD5 9f8d13bd28bbac07efe0af68e8a30ad3
BLAKE2b-256 277908f8858ef351ea893cd2acf181ccf467a455a271f5999326b872227873f7

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 56d3e3dbcf43062751e7ba877feea4e81bfd51ac56393534e3af9b6d070b797f
MD5 d274afb1717a3d7b18dc23b67ee0e04c
BLAKE2b-256 88d0a04d83261e89161a1b4774e861fb80bb06e2968d087ea2a9f76170c08435

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 68bbdcf6367b8a254aa8e1cb51f8aaff345e45ec690c2ba789f4cf6b9cef8ee9
MD5 0887ca97568140681fca57bfd1ff84b1
BLAKE2b-256 0705ef6cbd0489106a07b69fc7ae246538a46d95129d865f260ac295afadc0bd

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5821ba14275fdd5c37482b6df363aee15afe3baf0b54421bbc074b5e74ab570
MD5 cb6392c031f99a1108a7b3cf030f6656
BLAKE2b-256 b3d5b7d672f144deeb824c9026d2150c319c3f5dd7d2722ffb32b23d8de41577

See more details on using hashes here.

File details

Details for the file fastvect-1.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastvect-1.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 700cf60a1e8a75ae86ce044b840343267813cce854654b3756a11291e860645a
MD5 9f3677a4216028b7aa62f80ec9115631
BLAKE2b-256 ff43f1ea60eb94b92ac448265c334dbe0e32f0fd79809461604c4f3368e0a8f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page