Re: Auto-vectorization speeds up multiplication of large-precision numerics
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Khandekar <amitdkhan.pg@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-07T01:44:15Z
Lists: pgsql-hackers
Amit Khandekar <amitdkhan.pg@gmail.com> writes: > I did as above. Attached is the v2 patch. I made some cosmetic changes to this and committed it. AFAICT, there's no measurable performance change to the "numeric" regression test, but I got a solid 45% speedup on "numeric_big", so it's clearly a win for wider arithmetic cases. It seemed to me to be useful to actually rename CFLAGS_VECTOR if we're changing its meaning, so I made it CFLAGS_VECTORIZE. regards, tom lane
Commits
-
Use plain memset() in numeric.c, not MemSet and friends.
- 3438c988fd75 14.0 landed
-
Frob numeric.c loop so that clang will auto-vectorize it too.
- 9c79e646c6f0 14.0 landed
-
Apply auto-vectorization to the inner loop of numeric multiplication.
- 88709176236c 14.0 landed
-
Split Makefile symbol CFLAGS_VECTOR into two symbols.
- 695de5d1eda6 14.0 landed