pgsql: Perform slot validity checks in a separate pass over expression.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Perform slot validity checks in a separate pass over expression.
Date: 2017-12-29 20:48:19
Message-ID: E1eV1Zj-0001mp-Gx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Perform slot validity checks in a separate pass over expression.

This reduces code duplication a bit, but the primary benefit that it
makes JITing expression evaluation easier. When doing so we can't, as
previously done in the interpreted case, really change opcode without
recompiling. Nor dow we just carry around unnecessary branches to
avoid re-checking over and over.

As a minor side-effect this makes ExecEvalStepOp() O(log(N)) rather
than O(N).

Author: Andres Freund
Discussion: https://postgr.es/m/20170901064131.tazjxwus3k2w3ybh@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b40933101ca622aa8a35b6fe07ace36effadf1c7

Modified Files
--------------
src/backend/executor/execExpr.c | 7 +-
src/backend/executor/execExprInterp.c | 277 ++++++++++++++++++----------------
src/include/executor/execExpr.h | 14 +-
src/include/nodes/execnodes.h | 3 +
4 files changed, 165 insertions(+), 136 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2017-12-29 20:57:35 Re: pgsql: Use new overflow aware integer operations.
Previous Message Andres Freund 2017-12-29 20:21:54 Re: pgsql: Use new overflow aware integer operations.