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