2015
DOI: 10.1145/2858949.2784760
|View full text |Cite
|
Sign up to set email alerts
|

Functional pearl: a SQL to C compiler in 500 lines of code

Abstract: We present the design and implementation of a SQL query processor that outperforms existing database systems and is written in just about 500 lines of Scala code -a convincing case study that highlevel functional programming can handily beat C for systems-level programming where the last drop of performance matters.The key enabler is a shift in perspective towards generative programming. The core of the query engine is an interpreter for relational algebra operations, written in Scala. Using the opensource LMS… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
3
1
1

Citation Types

0
5
0

Year Published

2016
2016
2022
2022

Publication Types

Select...
4
3
1

Relationship

2
6

Authors

Journals

citations
Cited by 13 publications
(5 citation statements)
references
References 22 publications
0
5
0
Order By: Relevance
“…For example, NbE could be used in the security domain, to automatically remove superfluous security checks performed at runtime by programs written in a security eDSL (e.g., [39]). Similarly, in databases (e.g., [37]), NbE could be used normalize queries written in a higher-order eDSL to achieve elimination of higher-order functions and other intermediate data-structures [15,25].…”
Section: Final Remarksmentioning
confidence: 99%
“…For example, NbE could be used in the security domain, to automatically remove superfluous security checks performed at runtime by programs written in a security eDSL (e.g., [39]). Similarly, in databases (e.g., [37]), NbE could be used normalize queries written in a higher-order eDSL to achieve elimination of higher-order functions and other intermediate data-structures [15,25].…”
Section: Final Remarksmentioning
confidence: 99%
“…The Legobase [39] query compiler is implemented in Scala and uses the lightweight modular staging framework (LMS) [56] to generate optmized C. DBLAB [57] reimplements Legobase and uses multiple compiler passes to compile queries. The LB2 [64] query compiler expanded the work presented in ("SQL to C in 500 lines" [55]) and demonstrated that highly ecient query compilation can be performed eciently in a single compiler pass. LB2-Graph [66] supports compiling graph workloads in LB2.…”
Section: Related Workmentioning
confidence: 99%
“…LMS draws inspiration from earlier work such as TaskGraph [Beckmann et al 2003], a C++ framework for program generation and optimization. LMS has been used in a variety of applications, ranging from web programming [Kossakowski et al 2012] over domain-specific languages for machine learning ] to database engines [Rompf and Amin 2015] and distributed systems [Ackermann et al 2012].…”
Section: Related Workmentioning
confidence: 99%