From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Ants Aasma <ants.aasma@eesti.ee>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: WIP: Faster Expression Processing v4
Date: Sat, 25 Mar 2017 23:51:45 -0400
Message-ID: <23529.1490500305@sss.pgh.pa.us> (raw)
In-Reply-To: <3CC5B4C5-3ADB-4296-A04B-64F594A4CE4F@anarazel.de>
References: <20170324004734.3a2dokbfofiz6ylu@alap3.anarazel.de>
<30270.1490318779@sss.pgh.pa.us>
<20170324013412.qy7ltnnqv5m7qiuc@alap3.anarazel.de>
<31825.1490320683@sss.pgh.pa.us>
<20170324020003.4rt63xty7xpb4akq@alap3.anarazel.de>
<22215.1490369187@sss.pgh.pa.us>
<20170324182742.3r4qndpugtx6ga3t@alap3.anarazel.de>
<22833.1490390175@sss.pgh.pa.us>
<13918.1490410879@sss.pgh.pa.us>
<5768.1490458935@sss.pgh.pa.us>
<20170325222202.uz6evsjqrtwjnql6@alap3.anarazel.de>
<CA+CSw_uq4OeY7i5u7=XeXXpJa0dMjfztP6FXrxQct-u=9vXJLA@mail.gmail.com>
<3CC5B4C5-3ADB-4296-A04B-64F594A4CE4F@anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Andres Freund <andres@anarazel.de> writes:
> On March 25, 2017 4:56:11 PM PDT, Ants Aasma <ants.aasma@eesti.ee> wrote:
>> I haven't had the time to research this properly, but initial tests
>> show that with GCC 6.2 adding
>>
>> #pragma GCC optimize ("no-crossjumping")
>>
>> fixes merging of the op tail jumps.
>>
>> Some quick and dirty benchmarking suggests that the benefit for the
>> interpreter is about 15% (5% speedup on a workload that spends 1/3 in
>> ExecInterpExpr). My idea of prefetching op->resnull/resvalue to local
>> vars before the indirect jump is somewhere between a tiny benefit and
>> no effect, certainly not worth introducing extra complexity. Clang 3.8
>> does the correct thing out of the box and is a couple of percent
>> faster than GCC with the pragma.
> That's large enough to be worth doing (although I recall you seeing all jumps commonalized). We should probably do this on a per function basis however (either using pragma push option, or function attributes).
Seems like it would be fine to do it on a per-file basis. If you're
worried about pessimizing the out-of-line subroutines, we could move
those to a different file --- it's pretty questionable that they're
in execExprInterp.c in the first place, considering they're meant to be
used by more than just that execution method.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, ants.aasma@eesti.ee, hlinnaka@iki.fi, tomas.vondra@2ndquadrant.com
Subject: Re: WIP: Faster Expression Processing v4
In-Reply-To: <23529.1490500305@sss.pgh.pa.us>
* 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