pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: rbalamohan (@rbalamohan) <noreply+rbalamohan@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #832: Perf: SIMD optimization for cosine similarity in pgvector
Date: Fri, 02 May 2025 07:47:31 +0000
Message-ID: <gh-pgvector-pgvector-832@github.com> (raw)

There are various cases where comparisons like 
`vector <=> '[0.01180855743587017,....-0.014453507959842682]` (1536 embeddings) are compared. This involves cosine similarity.  i.e in vector.c

Current implementation is based on scalar loop. Request is to provide options to make use of SIMD instructions on supported platforms. Almost all of modern h/w should support it, some docker images may not have the support. 

But basic request is to explore using SIMD instructions to speeden up things for this, when dimension are greater than 8.

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-832@github.com>
Permalink:  ../gh-pgvector-pgvector-832@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