mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-12 23:56:55 +08:00
Updated comments [skip ci]
This commit is contained in:
@@ -1190,9 +1190,9 @@ hamming_distance(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
CheckBitLengths(VARBITLEN(a), VARBITLEN(b));
|
CheckBitLengths(VARBITLEN(a), VARBITLEN(b));
|
||||||
|
|
||||||
|
/* TODO Improve performance */
|
||||||
for (uint32 i = 0; i < VARBITBYTES(a); i++)
|
for (uint32 i = 0; i < VARBITBYTES(a); i++)
|
||||||
distance += pg_number_of_ones[ax[i] ^ bx[i]];
|
distance += pg_number_of_ones[ax[i] ^ bx[i]];
|
||||||
|
|
||||||
/* TODO Decide on return type */
|
|
||||||
PG_RETURN_FLOAT8((double) distance);
|
PG_RETURN_FLOAT8((double) distance);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user