pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: Add optional JIT support for expression evaluation.
Date: Sat, 1 Apr 2017 00:41:41 -0700
Message-ID: <20170401074141.jgzageyn3fzshdf3@alap3.anarazel.de> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Based on the infrastructure added in b8d7f053c5c2b, this allows
expressions in expensive queries to be compiled to native code.  In
TPC-H this yields up to 40% of speedups.

Whenever a query has a total cost over jit_expression_minimum, all
expressions in it will be JIT compiled.  That allows to perform JIT
compilation of all expressions in one go, which is a lot more
efficient.


Originally slated for v11, discussions at pgconf.us convinced me to
add this to v10.

Author: Andres Freund
Reviewed-By: Robert Haas, Heikki Linnakangas
Discussion: http://postgr.es/m/20161206034955.bh33paeralxbtluv@alap3.anarazel.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d31084e9d1118b25fd16580d9d8c2924b5740dff

Modified Files
--------------
 configure                              |  109 ++
 configure.in                           |   37 +
 src/Makefile.global.in                 |   12 +
 src/backend/Makefile                   |    8 +
 src/backend/access/common/heaptuple.c  | 1438 +++++++++++++++--
 src/backend/access/common/tupdesc.c    |    6 +
 src/backend/executor/Makefile          |    6 +-
 src/backend/executor/execExprCompile.c | 2724 ++++++++++++++++++++++++++++++++
 src/backend/executor/execExpr.c        |  271 +++-
 src/backend/executor/execExprInterp.c  |  202 ++-
 src/backend/executor/execMain.c        |    5 +
 src/backend/executor/execTuples.c      |   32 +
 src/backend/executor/nodeAgg.c         |  393 ++---
 src/backend/executor/nodeHash.c        |   21 +-
 src/backend/lib/Makefile               |    5 +-
 src/backend/lib/llvmjit.c              |  324 ++++
 src/backend/lib/llvmjit_profile.cpp    |   33 +
 src/backend/utils/misc/guc.c           |   50 +
 src/backend/utils/resowner/resowner.c  |   32 +
 src/include/access/tupdesc.h           |    8 +
 src/include/executor/execExpr.h        |   55 +-
 src/include/executor/executor.h        |    7 +-
 src/include/executor/hashjoin.h        |    2 +
 src/include/executor/nodeAgg.h         |  273 ++++
 src/include/executor/tuptable.h        |    7 +-
 src/include/lib/llvmjit.h              |   45 +
 src/include/nodes/execnodes.h          |    8 +-
 src/include/pg_config.h.in             |    3 +
 src/include/utils/resowner_private.h   |    7 +
 29 files changed, 5689 insertions(+), 434 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



view thread (2+ messages)  latest in thread

Message-ID: <20170401074141.jgzageyn3fzshdf3@alap3.anarazel.de>
Permalink:  ../20170401074141.jgzageyn3fzshdf3@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20170401074141.jgzageyn3fzshdf3@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: Add optional JIT support for expression evaluation.
  In-Reply-To: <20170401074141.jgzageyn3fzshdf3@alap3.anarazel.de>
  References: <20170401074141.jgzageyn3fzshdf3@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox