pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: binarycleric (@binarycleric) <noreply+binarycleric@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #860: vectorize: optimize VectorSumCenter and HalfvecSumCenter
Date: Tue, 17 Jun 2025 17:49:02 +0000
Message-ID: <gh-pgvector-pgvector-860-c2981278730@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-860@github.com>
References: <gh-pgvector-pgvector-860@github.com>

I see that my change introduced the following compiler warning.

```
In file included from src/ivfutils.c:7:
src/halfutils.h:68:9: remark: floating point conversion changes vector width. Mixed floating point precision requires an up/down cast that will negatively impact performance. [-Rpass-analysis=loop-vectorize]
   68 |         return (float) num;
      |                ^
```

I'm looking into seeing if there is anything I can do to address this. Looks like any kind of change to use native ARM functions breaks vectorization. Despite the warning this commit does seem to improve performance (at least on ARM, which is what I have available to test).

view thread (11+ messages)  latest in thread

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