Skip to main content

SIMD-accelerated vector similarity search. 3-4x faster than FAISS at dim=384.

Project description

eavec

SIMD-accelerated vector similarity search. Pre-compiled kernels with a NumPy API.

pip install eavec

Quick start

import numpy as np
from eavec import batch_cosine, top_k

db = np.random.rand(100_000, 384).astype(np.float32)
query = np.random.rand(384).astype(np.float32)

scores = batch_cosine(query, db)
values, indices = top_k(scores, k=10)

Why eavec?

  • 3-4x faster than FAISS at dim=384 (the most common embedding dimension)
  • 8-27x faster than NumPy depending on metric and dimension
  • Zero dependencies beyond NumPy. No Rust, no LLVM, no compilation step.
  • Multi-threaded batch operations release the GIL for true parallelism.

API

Single-pair operations

Function Signature Returns
dot(a, b) two 1D float32 arrays float
norm(a) one 1D float32 array float
cosine(a, b) two 1D float32 arrays float
l2_squared(a, b) two 1D float32 arrays float

Batch operations

Function Signature Returns
batch_dot(query, db) query: 1D(dim,), db: 2D(n,dim) 1D float32(n,)
batch_cosine(query, db) query: 1D(dim,), db: 2D(n,dim) 1D float32(n,)
batch_l2(query, db) query: 1D(dim,), db: 2D(n,dim) 1D float32(n,)
normalize(db) db: 2D(n,dim) 2D float32(n,dim)
threshold_filter(scores, threshold) scores: 1D float32 1D int32 indices
top_k(scores, k) scores: 1D float32, k: int (values, indices)

Multi-threaded

Function Signature Returns
batch_dot_mt(query, db, num_threads=None) same + threads 1D float32(n,)
batch_cosine_mt(query, db, num_threads=None) same + threads 1D float32(n,)
batch_l2_mt(query, db, num_threads=None) same + threads 1D float32(n,)

Platforms

  • Linux x86_64 (AVX2)
  • Linux aarch64 (NEON)
  • Windows x86_64 (AVX2)

How it works

eavec ships pre-compiled SIMD kernels built with Ea, a SIMD kernel compiler. The kernels use dual-accumulator FMA with f32x8 vectors, restrict pointers for no-alias optimization, and explicit prefetch hints.

License

Apache-2.0

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.

eavec-0.1.0-py3-none-win_amd64.whl (18.9 kB view details)

Uploaded Python 3Windows x86-64

eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl (21.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl (19.2 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

File details

Details for the file eavec-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: eavec-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for eavec-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 bdd4e0effd0fea7149e45c9b7fa2078b7816ccd65bc75bb738ed8c4b3d1c36e1
MD5 43df8c087c5d4c61df0fa6f49cad06d7
BLAKE2b-256 aaf7c9817daffd648097323abd57ae08ee3f7068ca21aca7de40d3c80cb887ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for eavec-0.1.0-py3-none-win_amd64.whl:

Publisher: publish.yml on petlukk/eavec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 42f21b8ad43346607b9d5fd5537099d3c449dfd52729c9dd0d092d738326ef19
MD5 0ee0875a2fcea8906cbd0fd270c699e6
BLAKE2b-256 a4a06105c5493cdef41dd7edf13852dca89c0151102aa9873d0c869d9b640d16

See more details on using hashes here.

Provenance

The following attestation bundles were made for eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: publish.yml on petlukk/eavec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 2610d8da8be7987f9674b8a036a5bf2af3c0055060b59f92efb9d1165c74413a
MD5 f4762c8905aebc5c49c3fcc3fe6ff412
BLAKE2b-256 51f04c5851e040489bf3211b61b0de3def4132936d7359d78f241a5e0c3c40d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl:

Publisher: publish.yml on petlukk/eavec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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