OSDN Git Service

Replace the switching function ExecEvalExpr() with a macro that jumps
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Mar 2004 01:02:24 +0000 (01:02 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 17 Mar 2004 01:02:24 +0000 (01:02 +0000)
commitc1352052ef1d4eeb2eb1d822a207ddc2d106cb13
treecc396212df36959c1220a953a009636477c615b2
parent2c7e47343449e2a4f7694d04a5a4284d89246699
Replace the switching function ExecEvalExpr() with a macro that jumps
directly to the appropriate per-node execution function, using a function
pointer stored by ExecInitExpr.  This speeds things up by eliminating one
level of function call.  The function-pointer technique also enables further
small improvements such as only making one-time tests once (and then
changing the function pointer).  Overall this seems to gain about 10%
on evaluation of simple expressions, which isn't earthshaking but seems
a worthwhile gain for a relatively small hack.  Per recent discussion
on pghackers.
src/backend/executor/execQual.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeSubplan.c
src/include/executor/executor.h
src/include/executor/nodeSubplan.h
src/include/nodes/execnodes.h