Re: Reducing expression evaluation overhead

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Reducing expression evaluation overhead
Date: 2004-03-16 07:03:35
Message-ID: 87d67d1dfc.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> > b) Instead of storing one of a small set of function pointers in every
> > node of every expression, wouldn't it make more sense to have a table
> > lookup from node type to function pointer?
>
> That's pretty much what the ExecEvalExpr switch() does already, on most
> modern architectures.

Huh. <looks at the assembly on i386>. Indeed that's exactly what it's doing.
Amazing that a failed branch prediction in the wrong place can cause that huge
a penalty.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2004-03-16 07:11:35 Re: [PERFORM] rapid degradation after postmaster restart
Previous Message Manfred Spraul 2004-03-16 06:18:31 Re: WAL write of full pages