git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 87e6ed7) | patch
Frob numeric.c loop so that clang will auto-vectorize it too.
Mon, 7 Sep 2020 16:03:04 +0000 (12:03 -0400)
Mon, 7 Sep 2020 16:03:04 +0000 (12:03 -0400)
commit 9c79e646c6f0f8df06d966c536d0c6aa33bf1b06
Frob numeric.c loop so that clang will auto-vectorize it too.

Experimentation shows that clang will auto-vectorize the critical
multiplication loop if the termination condition is written "i2 < limit"
rather than "i2 <= limit". This seems unbelievably stupid, but I've
reproduced it on both clang 9.0.1 (RHEL8) and 11.0.3 (macOS Catalina).
gcc doesn't care, so tweak the code to do it that way.

Discussion: https://postgr.es/m/CAJ3gD9evtA_vBo+WMYMyT-u=keHX7-r8p2w7OSRfXf42LTwCZQ@mail.gmail.com
src/backend/utils/adt/numeric.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /