Re: Inlining comparators as a performance optimisation
Peter Geoghegan <peter@2ndquadrant.com>
From: Peter Geoghegan <peter@2ndquadrant.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-11-29T18:48:37Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Speed up conversion of signed integers to C strings.
- 4fc115b2e981 9.1.0 cited
-
Remove some unnecessary tests of pgstat_track_counts.
- f4d242ef9473 9.1.0 cited
-
Remove cvs keywords from all files.
- 9f2e21138693 9.1.0 cited
-
Code cleanup for function prototypes: change two K&R-style prototypes
- b9954fbb4ef2 8.3.0 cited
-
Use Min() instead of min() in qsort, for consistency and to avoid
- b38900c76776 8.2.0 cited
-
pgindent run for 8.2.
- f99a569a2ee3 8.2.0 cited
-
Switch over to using our own qsort() all the time, as has been proposed
- 6edd2b4a91bd 8.2.0 cited
On 29 November 2011 15:31, Bruce Momjian <bruce@momjian.us> wrote: > These are exciting advanced you are producing and I am hopeful we can > get this included in Postgres 9.2. Thanks Bruce. >I have mentioned already that I > think parallelism is the next big Postgres challenge, and of course, one > of the first areas for parallelism is sorting. I'm not sure that sorting has that much to recommend it as an initial target of some new backend parallelism other than being easy to implement. I've observed the qsort_arg specialisations in this patch out-perform stock qsort_arg by as much as almost 3 times. However, the largest decrease in a query's time that I've observed was 45%, and that was for a contrived worst-case for quicksort, but about 25% is much more typical of queries similar to the ones I've shown, for more normative data distributions. While that's a respectable gain, it isn't a paradigm shifting one, and it makes parallelising qsort itself for further improvements quite a lot less attractive - there's too many other sources of overhead. -- Peter Geoghegan http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training and Services