From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Default JIT setting in V12 |
Date: | 2019-09-04 15:24:38 |
Message-ID: | 20190904152438.pv4vdk3ctuvvnxh3@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2019-09-04 07:51:16 -0700, Andres Freund wrote:
> On 2019-09-04 09:56:28 -0400, Jeff Janes wrote:
> > I think it is intuitive, and with empirical evidence, that we do not want
> > to JIT compile at all unless we are going to optimize the compiled code.
>
> There's pretty clear counter-evidence however as well :(
>
> I think it's probably more sensible to use some cheap minimal
> optimization for the "unoptimized" mode - because there's some
> non-linear cost algorithms with full optimizations enabled.
>
> How does your example look with something like:
>
> diff --git i/src/backend/jit/llvm/llvmjit.c w/src/backend/jit/llvm/llvmjit.c
> index 82c4afb7011..85ddae2ea2b 100644
> --- i/src/backend/jit/llvm/llvmjit.c
> +++ w/src/backend/jit/llvm/llvmjit.c
> @@ -428,7 +428,7 @@ llvm_optimize_module(LLVMJitContext *context, LLVMModuleRef module)
> if (context->base.flags & PGJIT_OPT3)
> compile_optlevel = 3;
> else
> - compile_optlevel = 0;
> + compile_optlevel = 1;
>
> /*
> * Have to create a new pass manager builder every pass through, as the
>
> which I think - but I'd have to check - doesn't include any of the
> non-linear cost optimizations.
Or better, something slightly more complete, like the attached (which
affects both code-gen time optimizations (which are more like peephole
ones), and both function/global ones that are cheap).
Greetings,
Andres Freund
Attachment | Content-Type | Size |
---|---|---|
llvm.diff | text/x-diff | 3.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Sergei Kornilov | 2019-09-04 16:19:47 | Re: Planning counters in pg_stat_statements (using pgss_store) |
Previous Message | Alvaro Herrera | 2019-09-04 15:15:35 | auxiliary processes in pg_stat_ssl |