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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdd4e0effd0fea7149e45c9b7fa2078b7816ccd65bc75bb738ed8c4b3d1c36e1
|
|
| MD5 |
43df8c087c5d4c61df0fa6f49cad06d7
|
|
| BLAKE2b-256 |
aaf7c9817daffd648097323abd57ae08ee3f7068ca21aca7de40d3c80cb887ba
|
Provenance
The following attestation bundles were made for eavec-0.1.0-py3-none-win_amd64.whl:
Publisher:
publish.yml on petlukk/eavec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eavec-0.1.0-py3-none-win_amd64.whl -
Subject digest:
bdd4e0effd0fea7149e45c9b7fa2078b7816ccd65bc75bb738ed8c4b3d1c36e1 - Sigstore transparency entry: 1008453165
- Sigstore integration time:
-
Permalink:
petlukk/eavec@5415848fc8b76a52cc0e1da5db778a468f26746e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/petlukk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5415848fc8b76a52cc0e1da5db778a468f26746e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42f21b8ad43346607b9d5fd5537099d3c449dfd52729c9dd0d092d738326ef19
|
|
| MD5 |
0ee0875a2fcea8906cbd0fd270c699e6
|
|
| BLAKE2b-256 |
a4a06105c5493cdef41dd7edf13852dca89c0151102aa9873d0c869d9b640d16
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eavec-0.1.0-py3-none-manylinux_2_17_x86_64.whl -
Subject digest:
42f21b8ad43346607b9d5fd5537099d3c449dfd52729c9dd0d092d738326ef19 - Sigstore transparency entry: 1008453167
- Sigstore integration time:
-
Permalink:
petlukk/eavec@5415848fc8b76a52cc0e1da5db778a468f26746e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/petlukk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5415848fc8b76a52cc0e1da5db778a468f26746e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl.
File metadata
- Download URL: eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2610d8da8be7987f9674b8a036a5bf2af3c0055060b59f92efb9d1165c74413a
|
|
| MD5 |
f4762c8905aebc5c49c3fcc3fe6ff412
|
|
| BLAKE2b-256 |
51f04c5851e040489bf3211b61b0de3def4132936d7359d78f241a5e0c3c40d7
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
eavec-0.1.0-py3-none-manylinux_2_17_aarch64.whl -
Subject digest:
2610d8da8be7987f9674b8a036a5bf2af3c0055060b59f92efb9d1165c74413a - Sigstore transparency entry: 1008453166
- Sigstore integration time:
-
Permalink:
petlukk/eavec@5415848fc8b76a52cc0e1da5db778a468f26746e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/petlukk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5415848fc8b76a52cc0e1da5db778a468f26746e -
Trigger Event:
workflow_dispatch
-
Statement type: