Re: A qsort template
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: Thomas Munro <thomas.munro@gmail.com>, Andres Freund <andres@anarazel.de>, Justin Pryzby <pryzby@telsasoft.com>, Peter Geoghegan <pg@bowt.ie>, pgsql-hackers <pgsql-hackers@postgresql.org>,
Robert Haas <rhaas@postgresql.org>
Date: 2022-04-14T06:46:00Z
Lists: pgsql-hackers
Attachments
- qsort-fix-regression-dgr1.ods (application/vnd.oasis.opendocument.spreadsheet)
On Wed, 13 Apr 2022 at 23:19, John Naylor <john.naylor@enterprisedb.com> wrote: > More broadly than the regression, Thomas' is very often the fastest of > all, at the cost of more binary size. David's is occasionally slower > than v15 or v15 with revert, but much of that is a slight difference > and some is probably noise. Just to get an opinion from some other hardware, I've run your test script on my AMD 3990x machine. My opinion here is that the best thing we can learn from both of our results is, do the patches fix the regression? I don't believe it should be about if adding the additional specializations performs better than skipping the tie break function call. I think it's pretty obvious that the specializations will be faster. I think if it was decided that v16 would be the version where more work should be done to decide on what should be specialized and what shouldn't be, then we shouldn't let this regression force our hand to make that choice now. It'll be pretty hard to remove any specializations once they've been in a released version of Postgres. David
Commits
-
Remove debug messages from tuplesort_sort_memtuples()
- 6e647ef0e750 15.0 landed
-
Fix performance regression in tuplesort specializations
- 99c754129d78 15.0 landed
-
Fix tuplesort optimization for CLUSTER-on-expression.
- cc58eecc5d75 15.0 landed
-
Initial pgindent and pgperltidy run for v14.
- def5b065ff22 14.0 cited
-
Specialize checkpointer sort functions.
- 1b88b8908e75 14.0 landed
-
Use sort_template.h for qsort() and qsort_arg().
- f374f4d66425 14.0 landed
-
Use sort_template.h for qsort_tuple() and qsort_ssup().
- 8eda3eba3063 14.0 landed
-
Add sort_template.h for making sort functions.
- 0a1f1d3cac6b 14.0 landed
-
Use abbreviated keys for faster sorting of text datums.
- 4ea51cdfe85c 9.5.0 cited