vxdb-server 0.5.1__tar.gz → 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/Cargo.lock +3 -3
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/Cargo.toml +1 -1
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/PKG-INFO +1 -1
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/Cargo.toml +1 -1
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/distance/cosine.rs +4 -6
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/distance/dot.rs +4 -6
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/distance/euclidean.rs +4 -6
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/storage/mmap.rs +4 -2
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/README.md +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/collection.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/distance/mod.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/distance/simd.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/error.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/filter.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/hybrid.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/index/flat.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/index/hnsw.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/index/mod.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/lib.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/storage/metadata.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/storage/mod.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/storage/persistent.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/storage/wal.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-core/src/types.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-server/Cargo.toml +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-server/README.md +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-server/src/config.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-server/src/main.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/crates/vxdb-server/src/routes.rs +0 -0
- {vxdb_server-0.5.1 → vxdb_server-0.6.0}/pyproject.toml +0 -0
|
@@ -1837,7 +1837,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
|
1837
1837
|
|
|
1838
1838
|
[[package]]
|
|
1839
1839
|
name = "vxdb-core"
|
|
1840
|
-
version = "0.
|
|
1840
|
+
version = "0.6.0"
|
|
1841
1841
|
dependencies = [
|
|
1842
1842
|
"memmap2",
|
|
1843
1843
|
"parking_lot",
|
|
@@ -1851,7 +1851,7 @@ dependencies = [
|
|
|
1851
1851
|
|
|
1852
1852
|
[[package]]
|
|
1853
1853
|
name = "vxdb-python"
|
|
1854
|
-
version = "0.
|
|
1854
|
+
version = "0.6.0"
|
|
1855
1855
|
dependencies = [
|
|
1856
1856
|
"pyo3",
|
|
1857
1857
|
"serde_json",
|
|
@@ -1860,7 +1860,7 @@ dependencies = [
|
|
|
1860
1860
|
|
|
1861
1861
|
[[package]]
|
|
1862
1862
|
name = "vxdb-server"
|
|
1863
|
-
version = "0.
|
|
1863
|
+
version = "0.6.0"
|
|
1864
1864
|
dependencies = [
|
|
1865
1865
|
"axum",
|
|
1866
1866
|
"clap",
|
|
@@ -3,7 +3,7 @@ name = "vxdb-core"
|
|
|
3
3
|
version.workspace = true
|
|
4
4
|
edition.workspace = true
|
|
5
5
|
license.workspace = true
|
|
6
|
-
description = "Core engine for vxdb
|
|
6
|
+
description = "Core engine for vxdb, a lightweight, high-performance vector database"
|
|
7
7
|
|
|
8
8
|
[features]
|
|
9
9
|
default = []
|
|
@@ -29,11 +29,9 @@ pub(crate) fn cosine_scalar(a: &[f32], b: &[f32]) -> f32 {
|
|
|
29
29
|
let mut adot = [0.0f32; LANES];
|
|
30
30
|
let mut anorm_a = [0.0f32; LANES];
|
|
31
31
|
let mut anorm_b = [0.0f32; LANES];
|
|
32
|
-
let
|
|
33
|
-
let
|
|
34
|
-
for (x, y) in ca.
|
|
35
|
-
let x: &[f32; LANES] = x.try_into().unwrap();
|
|
36
|
-
let y: &[f32; LANES] = y.try_into().unwrap();
|
|
32
|
+
let (ca, ra) = a.as_chunks::<LANES>();
|
|
33
|
+
let (cb, rb) = b.as_chunks::<LANES>();
|
|
34
|
+
for (x, y) in ca.iter().zip(cb) {
|
|
37
35
|
for j in 0..LANES {
|
|
38
36
|
adot[j] += x[j] * y[j];
|
|
39
37
|
anorm_a[j] += x[j] * x[j];
|
|
@@ -43,7 +41,7 @@ pub(crate) fn cosine_scalar(a: &[f32], b: &[f32]) -> f32 {
|
|
|
43
41
|
let mut dot: f32 = adot.iter().sum();
|
|
44
42
|
let mut norm_a: f32 = anorm_a.iter().sum();
|
|
45
43
|
let mut norm_b: f32 = anorm_b.iter().sum();
|
|
46
|
-
for (x, y) in
|
|
44
|
+
for (x, y) in ra.iter().zip(rb) {
|
|
47
45
|
dot += x * y;
|
|
48
46
|
norm_a += x * x;
|
|
49
47
|
norm_b += y * y;
|
|
@@ -27,17 +27,15 @@ pub(crate) fn dot(a: &[f32], b: &[f32]) -> f32 {
|
|
|
27
27
|
pub(crate) fn dot_scalar(a: &[f32], b: &[f32]) -> f32 {
|
|
28
28
|
const LANES: usize = 8;
|
|
29
29
|
let mut acc = [0.0f32; LANES];
|
|
30
|
-
let
|
|
31
|
-
let
|
|
32
|
-
for (x, y) in ca.
|
|
33
|
-
let x: &[f32; LANES] = x.try_into().unwrap();
|
|
34
|
-
let y: &[f32; LANES] = y.try_into().unwrap();
|
|
30
|
+
let (ca, ra) = a.as_chunks::<LANES>();
|
|
31
|
+
let (cb, rb) = b.as_chunks::<LANES>();
|
|
32
|
+
for (x, y) in ca.iter().zip(cb) {
|
|
35
33
|
for j in 0..LANES {
|
|
36
34
|
acc[j] += x[j] * y[j];
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
let mut sum: f32 = acc.iter().sum();
|
|
40
|
-
for (x, y) in
|
|
38
|
+
for (x, y) in ra.iter().zip(rb) {
|
|
41
39
|
sum += x * y;
|
|
42
40
|
}
|
|
43
41
|
-sum
|
|
@@ -33,18 +33,16 @@ pub(crate) fn euclidean(a: &[f32], b: &[f32]) -> f32 {
|
|
|
33
33
|
pub(crate) fn euclidean_scalar(a: &[f32], b: &[f32]) -> f32 {
|
|
34
34
|
const LANES: usize = 8;
|
|
35
35
|
let mut acc = [0.0f32; LANES];
|
|
36
|
-
let
|
|
37
|
-
let
|
|
38
|
-
for (x, y) in ca.
|
|
39
|
-
let x: &[f32; LANES] = x.try_into().unwrap();
|
|
40
|
-
let y: &[f32; LANES] = y.try_into().unwrap();
|
|
36
|
+
let (ca, ra) = a.as_chunks::<LANES>();
|
|
37
|
+
let (cb, rb) = b.as_chunks::<LANES>();
|
|
38
|
+
for (x, y) in ca.iter().zip(cb) {
|
|
41
39
|
for j in 0..LANES {
|
|
42
40
|
let d = x[j] - y[j];
|
|
43
41
|
acc[j] += d * d;
|
|
44
42
|
}
|
|
45
43
|
}
|
|
46
44
|
let mut sum: f32 = acc.iter().sum();
|
|
47
|
-
for (x, y) in
|
|
45
|
+
for (x, y) in ra.iter().zip(rb) {
|
|
48
46
|
let d = x - y;
|
|
49
47
|
sum += d * d;
|
|
50
48
|
}
|
|
@@ -163,8 +163,10 @@ impl MmapVectorStorage {
|
|
|
163
163
|
let bytes = &mmap[offset..offset + byte_len];
|
|
164
164
|
|
|
165
165
|
let floats: Vec<f32> = bytes
|
|
166
|
-
.
|
|
167
|
-
.
|
|
166
|
+
.as_chunks::<4>()
|
|
167
|
+
.0
|
|
168
|
+
.iter()
|
|
169
|
+
.map(|chunk| f32::from_le_bytes(*chunk))
|
|
168
170
|
.collect();
|
|
169
171
|
|
|
170
172
|
Ok(floats)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|