Specializing PostgreSQL Expression Interpreter with Code Annotations

Eugene Sharygin, Michael Vyacheslavovich Pantilimonov, Ruben Arturovich Buchatskiy · 2021

Vast majority of execution engines are first im-plemented as interpreters. Once they reach maturity and gain audience authors strive to improve performance by utilizing static or JIT compilation techniques. The latter helps to achieve the goal but at the expense of increased maintenance costs as source code splits into two loosely connected components. One solution to this problem is a program specialization method that utilizes existing interpreter's code and semi-automatically generates a compiler. In this paper we apply program specialization to the in-terpreter of the language of SQL expressions in PostgreSQL and show how the results compare against both the original interpreter and the built-in LLVM-based just-in-time compiler.

Read the paper · More papers on PaperTik