Commercial and open source database systems consist of millions of lines of highly optimized C code. Yet, their performance on individual queries falls 10x or 100x short of what a hand-written, specialized, implementation of the same query can achieve.
In a recent joint project at Oracle Labs and the DATA Lab at EPFL, we have set out to implement a database query engine in Scala. With just about 3000 lines of Scala code, our prototype supports the full TPCH benchmark suite and runs queries several times as fast as highly-tuned commercial systems (> 10x peak speedup).
This talk will focus on the key design principle that sets the system apart from other DB engines: where other systems interpret query plans, operator by operator, we generate and compile low-level C code for whole queries using the LMS (Lightweight Modular Staging) framework.
In particular, the talk will discuss powerful generative programming patterns such as mixed-stage data
structures that contains both static and dynamic parts (e.g. static schema and dynamic values for data records) and staged interpreters which can be mechanically turned into compilers (e.g. for SQL queries or regular expressions).
These generative programming techniques provide a high degree of abstraction without performance penalty, and make Scala and LMS a more productive alternative to C for systems-level programming where the last drop of performance matters.
by Tiark Rompf (@tiarkrompf) - Oracle Labs
Tiark Rompf is a researcher at Oracle Labs. His work focuses on runtime code generation, advanced compiler technology, and associated language support. From 2008 to 2014 he was a member of Martin Odersky's Scala team at EPFL where he developed the LMS compiler framework and made various contributions to the Scala language and toolchain (delimited continuations, efficient immutable data structures, compiler speedups, type system work). He is a regular speaker at conferences.
CDA Tech provides training and job placement assistance across a variety of careers. Contact us today to learn about the CDA Advantage.
Looking for a new career? Youve come to the right place.
Air Mixed Gas Commercial Diver Maritime Welding EMT DMT Our Programs.
*Underwater Welding Training at CDA Tech.
ROOM AND BOARD FOR MILITARY VETS.
CDA is proud to honor our vets. Thats why well waive both your registration fee and room and board when you attend CDA Technical Institute.*
*Restrictions apply, call for details.
After a successful career in the Army as an Army Ranger and Special Forces Combat Diver, CDA Technical Institute not only gave me a second-to-none education but they gave me the tools to be a successful, internationally-certified commercial diver! With CDAs education, the right attitude and the right work ethic you will be successful in this field!
Byron Beplay, AMGCD Program.
CDA Tech goes way past anyone’s expectations of a trade school. From the very first day this staff will be with you step-for-step making sure you feel exactly like family and helping you to succeed. I loved this school and everyone here. So take it from me: Come join the CDA Tech commercial diving family and be a part of this awesome industry!
Trey Lancaster, AMGCD Program.
I went to a trade school and got my welding certification and that was not enough. I found CDA technical Institute online and decided to become a Commercial Diver because of my love for the water. I had the best time going through CDA Technical Institute and I would definitely recommend this school to anyone looking for a career in Commercial Diving.
Brett Lamb, AMGCD Program.