From: | Sailesh Krishnamurthy <sailesh(at)cs(dot)berkeley(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Reducing expression evaluation overhead |
Date: | 2004-03-16 01:58:36 |
Message-ID: | mjq3c89sgc3.fsf@cs.berkeley.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
Tom> I'm not sure that this would let us catch up to what Arjen
Tom> reports as MySQL's expression evaluation speed, but it should
Tom> at least speed things up a bit with only fairly localized
Tom> changes.
I like the idea of memoizing the switch with function pointers as I
don't think branch prediction helps much with varying switch arms
selected with different exprs. Also I agree that the delta of indirect
function invocation is probably small.
I've forgotten the syntax of case, but for the simple form isn't
expr=const going to be the same expr for each case arm ? If that's the
case, couldn't we actually save the value of expr in a Datum and then
reuse that (through a Const) in each of the other arms to evaluate the
actual exprs ? That should reduce the number of times ExecEvalVar (and
through it heapgetattr) are called.
--
Pip-pip
Sailesh
http://www.cs.berkeley.edu/~sailesh
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-03-16 02:42:58 | Re: listening addresses |
Previous Message | Philip Warner | 2004-03-16 00:56:34 | Re: Custom format for pg_dumpall |