Re: Reducing expression evaluation overhead - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Reducing expression evaluation overhead
Date
Msg-id 87d67d1dfc.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Reducing expression evaluation overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.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



pgsql-hackers by date:

Previous
From: Manfred Spraul
Date:
Subject: Re: WAL write of full pages
Next
From: Joe Conway
Date:
Subject: Re: [PERFORM] rapid degradation after postmaster restart