From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #709: Shouldn't there be `restrict` keyword at parameters in `VectorInnerProduct()`?
Date: Sat, 09 Nov 2024 17:56:54 +0000
Message-ID: <gh-pgvector-pgvector-709-c2466333481@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-709@github.com>
References: <gh-pgvector-pgvector-709@github.com>
Hi @ivanstepanovftw,
1. I understand why `restrict` exists, but haven't seen any evidence it enables additional optimizations for `VectorInnerProduct` and the current compilation flags (the link above is for a completely different function)
2. The performance doesn't matter if there are situations when `ax` and `bx` can be the same, as violating `restrict` results in undefined behavior
In general, please share high level benchmarks for proposed performance improvements.