Speeding up the Local C++ Development Cycle with Header Substitution
C++ remains one of the most widely used languages in various fields, from embedded programming to high-performance computing. While C++ is being continuously updated with new features, one important aspect that has been overlooked is compilation time. Simply including a few header files can cause compilation time to increase significantly. An alternative to including header files is using forward declarations; however, the rules for forward declaring functions and classes are non obvious and can be confusing to most developers. Additionally, forward declaring methods, as well as functions that accept lambdas as arguments, is not possible. In this paper, we present a novel technique, termed header substitution, to automatically detect opportunities for forward declarations with the goal of replacing header includes and improving compilation time. As an alternative to forward declaring methods and functions with lambda arguments, header substitution introduces function and method wrappers which provide the same benefits. We implemented this technique in a tool, dubbed Yalla, and applied it to various C++ projects in order to speed up the development cycle, i.e., debugging, editing, compiling, and re-running loop, achieving up to a 24.5x speedup in compiling C++ files and a 4.68x speedup in the development cycle.
Wed 5 MarDisplayed time zone: Pacific Time (US & Canada) change
12:00 - 13:00 | Runtime & System ToolsMain Conference at Casuarina Ballroom (Level 2) Chair(s): Ajay Brahmakshatriya Massachusetts Institute of Technology | ||
12:00 20mTalk | GoFree: Reducing Garbage Collection via Compiler-inserted Freeing Main Conference Haoran Peng University of Science and Technology of China, Yu Zhang University of Science and Technology of China, Michael D. Ernst University of Washington, Jinbao Chen University of Science and Technology of China, Boyao Ding University of Science and Technology of China DOI | ||
12:20 20mTalk | Improving Native-Image Startup Performance Main Conference Matteo Basso Università della Svizzera italiana (USI), Aleksandar Prokopec Oracle Labs, Andrea Rosà USI Lugano, Walter Binder USI Lugano | ||
12:40 20mTalk | Speeding up the Local C++ Development Cycle with Header Substitution Main Conference Nader Al Awar The University of Texas at Austin, Zijian Yi The University of Texas at Austin, George Biros The University of Texas at Austin, Milos Gligoric The University of Texas at Austin |