# ClangJIT: Enhancing C++ with Just-in-Time Compilation

**Authors:** Hal Finkel, David Poliakoff, David F. Richards

arXiv: 1904.08555 · 2019-04-30

## TL;DR

ClangJIT introduces a dynamic, just-in-time compilation extension for C++ that enables runtime template specialization, leading to performance gains and improved productivity with minimal application modifications.

## Contribution

It presents a novel JIT extension for C++ that allows runtime template specialization, enhancing performance and productivity in large-scale applications.

## Key findings

- Significant performance improvements observed in large-scale applications.
- Minimal code changes needed for integration.
- Reduced compilation time through dynamic specialization.

## Abstract

The C++ programming language is not only a keystone of the high-performance-computing ecosystem but has proven to be a successful base for portable parallel-programming frameworks. As is well known, C++ programmers use templates to specialize algorithms, thus allowing the compiler to generate highly-efficient code for specific parameters, data structures, and so on. This capability has been limited to those specializations that can be identified when the application is compiled, and in many critical cases, compiling all potentially-relevant specializations is not practical. ClangJIT provides a well-integrated C++ language extension allowing template-based specialization to occur during program execution. This capability has been implemented for use in large-scale applications, and we demonstrate that just-in-time-compilation-based dynamic specialization can be integrated into applications, often requiring minimal changes (or no changes) to the applications themselves, providing significant performance improvements, programmer-productivity improvements, and decreased compilation time.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.08555/full.md

## Figures

7 figures with captions in the complete paper: https://tomesphere.com/paper/1904.08555/full.md

## References

26 references — full list in the complete paper: https://tomesphere.com/paper/1904.08555/full.md

---
Source: https://tomesphere.com/paper/1904.08555