diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bae341..5c88292 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.1.2 (unreleased) +- Vectorized distance calculations - Improved cost estimation ## 0.1.1 (2021-04-25) diff --git a/Makefile b/Makefile index c853d35..d93d36a 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,17 @@ TESTS = $(wildcard sql/*.sql) REGRESS = btree cast copy functions ivfflat_cosine ivfflat_ip ivfflat_l2 ivfflat_unlogged vector +# For auto-vectorization: +# - GCC (needs -ftree-vectorize OR -O3) - https://gcc.gnu.org/projects/tree-ssa/vectorization.html +# - Clang (could use pragma instead) - https://llvm.org/docs/Vectorizers.html +PG_CFLAGS = -march=native -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math + +# Debug GCC auto-vectorization +# PG_CFLAGS += -fopt-info-vec + +# Debug Clang auto-vectorization +# PG_CFLAGS += -Rpass=loop-vectorize -Rpass-analysis=loop-vectorize + PG_CONFIG ?= pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS)