Re: Inlining comparators as a performance optimisation
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, Peter Geoghegan <peter@2ndquadrant.com>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-09-21T16:13:20Z
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 21.09.2011 18:46, Tom Lane wrote: > Well, we'd have to negotiate what the API ought to be. What I'm > envisioning is that datatypes could provide alternate comparison > functions that are designed to be qsort-callable rather than > SQL-callable. As such, they could not have entries in pg_proc, so > it seems like there's no ready way to represent them in the catalogs. Quite aside from this qsort-thing, it would be nice to have versions of all simple functions that could be called without the FunctionCall overhead. So instead of: FunctionCall2(&flinfo_for_int4pl, 1, 2) you could do simply int4pl_fastpath(1,2) I'm not sure how big an effect this would have, but it seems like it could shave some cycles across the system. We could have an extended version of the PG_FUNCTION_INFO_V1 macro that would let you register the fastpath function: PG_FUNCTION_INFO_V1(int4pl, int4pl_fastpath); -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com