Re: Pre-alloc ListCell's optimization
Stephen Frost <sfrost@snowman.net>
From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2012-05-16T17:03:57Z
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 →
-
Replace the parser's namespace tree (which formerly had the same
- a4996a895399 8.1.0 cited
-
Turns out that my recent elimination of the 'redundant' flatten_andors()
- 56c88772911b 8.1.0 cited
* Stephen Frost (sfrost@snowman.net) wrote: > So, when it comes to palloc() reduction, this patch would eliminate 99% > of palloc's due to lists. For the regression tests, we're talking about > reducing 893,206 palloc calls to only 1. Apologies, that wasn't quite right- it'd reduce it to 1 palloc call for each of the 893,206 lists. In terms of actual comparison of palloc calls, we have to look at how many are done today for those lists: palloc calls for: 1-node lists: 1143794 2-node lists: 673071 3-node lists: 205364 4-node lists: 133650 5-node lists: 60552 6-node lists: 28896 7-node lists: 13248 8-node lists: 27045 Total: 2,285,620 Instead, we'd have 1 palloc call for each list, or 893,206, so we'd be removing ~1.4M calls across the regression suite. I'll work on cleaning up the patch to be committable early in the 9.3 dev cycle, so it can get a lot of testing prior to the next release. Thanks, Stephen