| From: | Matheus Alcantara <matheusssilv97(at)gmail(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de>, Pierre Ducroquet <p(dot)psql(at)pinaraf(dot)info> |
| Cc: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] llvmjit: always add the simplifycfg pass |
| Date: | 2026-01-29 13:32:04 |
| Message-ID: | cd855ae3-d11e-461d-be65-132341e2837e@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 28/01/26 20:19, Andres Freund wrote:
>>> I did some benchmarks on some TPCH queries (1 and 4) and I got these
>>> results. Note that for these tests I set jit_optimize_above_cost=1000000
>>> so that it force to use the default<O0> pass with simplifycfg.
>
> FYI, you can use -1 to just disble it, instead of having to rely on a specific
> cost.
>
Yeap, it's easier to disable at all, thanks for pointing this out.
>>>
>>> Master Q1:
>>> Timing: Generation 1.553 ms (Deform 0.573 ms), Inlining 0.052 ms, Optimization 95.571 ms, Emission 58.941 ms, Total 156.116 ms
>>> Execution Time: 38221.318 ms
>>>
>>> Patch Q1:
>>> Timing: Generation 1.477 ms (Deform 0.534 ms), Inlining 0.040 ms, Optimization 95.364 ms, Emission 58.046 ms, Total 154.927 ms
>>> Execution Time: 38257.797 ms
>>>
>>> Master Q4:
>>> Timing: Generation 0.836 ms (Deform 0.309 ms), Inlining 0.086 ms, Optimization 5.098 ms, Emission 6.963 ms, Total 12.983 ms
>>> Execution Time: 19512.134 ms
>>>
>>> Patch Q4:
>>> Timing: Generation 0.802 ms (Deform 0.294 ms), Inlining 0.090 ms, Optimization 5.234 ms, Emission 6.521 ms, Total 12.648 ms
>>> Execution Time: 16051.483 ms
>>>
>>>
>>> For Q4 I see a small increase on Optimization phase but we have a good
>>> performance improvement on execution time. For Q1 the results are almost
>>> the same.
>
> These queries are all simple enough that I'm not sure this is a particularly
> good benchmark for optimization speed. In particular, the deform routines
> don't have to deal with a lot of columns and there aren't a lot of functions
> (although I guess that shouldn't really matter WRT simplifycfg).
Thanks for the insight. Do you know any other query from TPCH or any
other benchmark suite that we could use to get more realistic results?
--
Matheus Alcantara
EDB: https://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2026-01-29 13:33:13 | Re: pg_plan_advice |
| Previous Message | Euler Taveira | 2026-01-29 13:21:48 | Re: [PATCH] Add max_logical_replication_slots GUC |