Re: Query is over 2x slower with jit=on
Andreas Joseph Krogh <andreas@visena.com>
From: Andreas Joseph Krogh <andreas@visena.com>
To: "Jonathan S. Katz" <jkatz@postgresql.org>
Cc: Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-08-23T07:14:56Z
Lists: pgsql-hackers
På torsdag 23. august 2018 kl. 03:00:42, skrev Jonathan S. Katz < jkatz@postgresql.org <mailto:jkatz@postgresql.org>>: > On Aug 22, 2018, at 7:13 PM, Andres Freund <andres@anarazel.de> wrote: [snip] > For the archives sake: This likely largely is the consequence of > building with LLVM's expensive assertions enabled, as confirmed by > Jonathan over IM. I recompiled with the release version of LLVM. jit=on was still slower, but the discrepancy was not as bad as the previously reported result: jit = off Planning Time: 0.938 ms Execution Time: 935.599 ms jit = on Planning Time: 0.951 ms JIT: Functions: 184 Generation Time: 17.605 ms Inlining: true Inlining Time: 20.522 ms Optimization: true Optimization Time: 1001.034 ms Emission Time: 665.319 ms Execution Time: 2491.560 ms However, it was still 2x+ slower, so still +1ing for open items. I compiled with whatever switches LLVM that comes with Ubuntu 18.04 is built with, and without debugging or assertions. -- Andreas Joseph Krogh
Commits
-
Fix issues around EXPLAIN with JIT.
- e97c4d967ba5 11.0 landed
- c03c1449c092 12.0 landed
-
Collect JIT instrumentation from workers.
- e63441c3f5ca 11.0 landed
- 33001fd7a707 12.0 landed
-
Make EXPLAIN output for JIT compilation more dense.
- 6859bd2632d8 11.0 landed
- 52050ad8ebec 12.0 landed
-
Save/restore SPI's global variables in SPI_connect() and SPI_finish().
- 825f10fbda7a 11.0 cited
-
Rationalize handling of single and double quotes in bootstrap data.
- 55d26ff638f0 11.0 cited