30.1. What IsJIT compilation?
Postgres Pro has builtin support to performJIT compilation usingLLVM whenPostgres Pro is built with--with-llvm
.
30.1.1. JIT Accelerated Operations
CurrentlyPostgres Pro'sJIT implementation has support for accelerating expression evaluation and tuple deforming. Several other operations could be accelerated in the future.
Tuple deforming is the process of transforming an on-disk tuple (seeSection 66.6.1) into its in-memory representation. It can be accelerated by creating a function specific to the table layout and the number of columns to be extracted.
30.1.2. Inlining
Postgres Pro is very extensible and allows new data types, functions, operators and other database objects to be defined; seeChapter 36. In fact the built-in objects are implemented using nearly the same mechanisms. This extensibility implies some overhead, for example due to function calls (seeSection 36.3). To reduce that overhead,JIT compilation can inline the bodies of small functions into the expressions using them. That allows a significant percentage of the overhead to be optimized away.