Re: Reducing expression evaluation overhead

Поиск
Список
Период
Сортировка
От Sailesh Krishnamurthy
Тема Re: Reducing expression evaluation overhead
Дата
Msg-id mjq3c89sgc3.fsf@cs.berkeley.edu
обсуждение исходный текст
Ответ на Reducing expression evaluation overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Reducing expression evaluation overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Reducing expression evaluation overhead  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.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




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: Custom format for pg_dumpall
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: listening addresses