Efficient generation of machine code for query compilers

H Funke, J Mühlig, J Teubner - … of the 16th International Workshop on …, 2020 - dl.acm.org
Proceedings of the 16th International Workshop on Data Management on New …, 2020dl.acm.org
Query compilation can make query execution extremely efficient, but it introduces additional
compilation time. The compilation time causes a relatively high overhead especially for short-
running and high-complexity queries. We propose Flounder IR as a lightweight intermediate
representation for query compilation to reduce compilation times. Flounder IR is close to
machine assembly and adds just that set of features that is necessary for efficient query
compilation: virtual registers and function calls ease the construction of the compiler front …
Query compilation can make query execution extremely efficient, but it introduces additional compilation time. The compilation time causes a relatively high overhead especially for short-running and high-complexity queries.
We propose Flounder IR as a lightweight intermediate representation for query compilation to reduce compilation times. Flounder IR is close to machine assembly and adds just that set of features that is necessary for efficient query compilation: virtual registers and function calls ease the construction of the compiler front-end; database-specific extensions enable efficient pipelining in query plans; more elaborate IR features are intentionally left out to maximize compilation speed.
In this paper, we present the Flounder IR language and motivate its design; we show how the language makes query compilation intuitive and efficient; and we demonstrate with benchmarks how our Flounder library can significantly reduce query compilation times.
ACM Digital Library