From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Mendola Gaetano" <mendola(at)bigfoot(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Dllist public/private part |
Date: | 2003-07-01 00:44:59 |
Message-ID: | 20988.1057020299@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Mendola Gaetano" <mendola(at)bigfoot(dot)com> writes:
> I'm improving the Dllist in these direction:
AFAIR, catcache.c is the *only* remaining backend customer for Dllist,
and so any improvement for Dllist that breaks catcache is hardly an
improvement, no?
> 1) Avoid "if" statements in insertion/remove phase, for instance now the
> AddHeader appear like this:
<shrug> ... unless you can convert DLAddHead into a inline macro,
I doubt there'll be any visible performance difference.
> 2) Not using a malloc but using a "special" malloc that not perform
> a malloc for each request but do a BIG malloc at first request...
It would make more sense to migrate Dllist to use palloc. That's not
compatible with its use in frontend libpq; I've been speculating about
splitting off libpq to have a separate implementation instead of trying
to share code. I believe libpq only uses Dllist for the
pending-notify-events list, for which the code is poorly optimized
anyway (we don't need a doubly-linked list for that).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-07-01 00:49:42 | Re: [HACKERS] Missing array support |
Previous Message | Joe Conway | 2003-07-01 00:37:02 | Re: [HACKERS] Missing array support |