Re: WIP: Faster Expression Processing and Tuple Deforming (including JIT)
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Markus Nullmeier <dq124@uni-heidelberg.de>
Cc: pgsql-hackers@postgresql.org
Date: 2017-02-10T18:01:03Z
Lists: pgsql-hackers
Hi, On 2017-02-10 18:18:13 +0100, Markus Nullmeier wrote: > Well, if this thread of thought about hand-crafted JIT should be taken > up again by someone at some point in time, I guess it could be possible > to reuse tools that are already out there, such as "DynASM" > ( http://luajit.org/dynasm_features.html ) from the LuaJIT project > (currently offers x86-64, x86-32, ARM-32, PPC-32, and MIPS-32). > Maybe one could even recycle parts of the LuaJIT project itself > ( http://luajit.org/luajit.html , > http://article.gmane.org/gmane.comp.lang.lua.general/58908 ). FWIW, I'd looked at dynasm/luajit. One big reason to go for LLVM is that it has nearly all the infrastructure to make backend-functions/operators inlineable. Especially for some of the arithmetic operations and such, that'd be quite useful performance-wise. With LLVM you can just use clang on C to generate the IR, do some work to boil down the IR modules to the relevant functions (i.e. remove non sql-callable functions), for which LLVM has infrastructure, and then inline the functions that way. That's a lot harder to do with nearly everything else (save gcc's jit library, but the licensing and stability situation makes that unattractive. Greetings, Andres Freund
Commits
-
Improve performance of ExecEvalWholeRowVar.
- 2f0903ea1965 10.0 landed
-
Remove unreachable code in expression evaluation.
- ad46a2aa79f9 10.0 landed
-
Faster expression evaluation and targetlist projection.
- b8d7f053c5c2 10.0 landed
-
Avoid syntax error on platforms that have neither LOCALE_T nor ICU.
- 457a44487328 10.0 cited
-
Add configure test to see if the C compiler has gcc-style computed gotos.
- bc18126a6bcb 10.0 landed
-
Improve regression test coverage for TID scanning.
- be6c3d19fd45 10.0 landed
-
Improve expression evaluation test coverage.
- ce38949ba23a 10.0 landed
-
Fix two errors with nested CASE/WHEN constructs.
- f0c7b789ab12 9.6.0 cited