pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feedFrom: tkreuder (@tkreuder) <noreply+tkreuder@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #977: Add int8vec type for 8-bit integer vectors
Date: Mon, 13 Apr 2026 20:43:34 +0000
Message-ID: <gh-pgvector-pgvector-977-c4239501992@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-977@github.com>
References: <gh-pgvector-pgvector-977@github.com>
Benchmark: 50k vectors, 128 dimensions, HNSW L2, Top-10
Table size
• vector: 28 MB
• halfvec: 15 MB
• int8vec: 8.5 MB
Index size
• vector: 40 MB
• halfvec: 27 MB
• int8vec: 21 MB
Index build
• vector: 3.1s
• halfvec: 2.7s
• int8vec: 2.8s
Search (exec)
• vector: 0.25 ms
• halfvec: 1.43 ms
• int8vec: 0.65 ms
PostgreSQL 17.9, macOS ARM (M-series), hnsw_ef_search = 40 (default).
int8vec achieves ~70% table storage reduction vs vector while maintaining sub-millisecond search latency. Notably faster than halfvec at search due to smaller data footprint (better cache utilization).
Distance functions currently cast int8→float for computation. Future optimization opportunity: pure integer arithmetic with SIMD could further improve search performance.
view thread (8+ messages) latest in thread
Message-ID: <gh-pgvector-pgvector-977-c4239501992@github.com>
Permalink: ../gh-pgvector-pgvector-977-c4239501992@github.com/
·
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox