Abstract
Metaprogramming, the practice of writing programs that manipulate other programs at compile-time, continues to impact software development; enabling new approaches to optimisation, static analysis, and reflection. Nevertheless, a challenge associated with metaprogramming techniques, including C++ constexpr functionality, is an increase in compilation times. This paper presents ClangOz, a novel Clang-based research compiler that addresses this issue by evaluating annotated constant expressions in parallel, thereby reducing compilation time.
By evaluating constant expressions in parallel, ClangOz significantly reduces compilation times for metaprogramming-intensive codebases, enhancing developer productivity and iterative software development processes. To control this, ClangOz includes novel compiler intrinsics allowing developers to take full advantage of constexpr language features.
New i9-13900K benchmark results here demonstrate the performance advantage of ClangOz over traditional compilers, including a decrease in compile times across more benchmarks; and 100% parallel efficiency in two cases. Also introduced here is the C’est library, which provides a subset of the C++ standard library, with extended constexpr support.
We highlight applications of the constexpr language feature, and emphasise the relevance of ClangOz, a compiler tailored for parallel evaluation of relevant constant expressions. Developers can now utilise modern metaprogramming, while minimising compile times parametrically.
By evaluating constant expressions in parallel, ClangOz significantly reduces compilation times for metaprogramming-intensive codebases, enhancing developer productivity and iterative software development processes. To control this, ClangOz includes novel compiler intrinsics allowing developers to take full advantage of constexpr language features.
New i9-13900K benchmark results here demonstrate the performance advantage of ClangOz over traditional compilers, including a decrease in compile times across more benchmarks; and 100% parallel efficiency in two cases. Also introduced here is the C’est library, which provides a subset of the C++ standard library, with extended constexpr support.
We highlight applications of the constexpr language feature, and emphasise the relevance of ClangOz, a compiler tailored for parallel evaluation of relevant constant expressions. Developers can now utilise modern metaprogramming, while minimising compile times parametrically.
Original language | English |
---|---|
Title of host publication | Software, System, and Service Engineering |
Subtitle of host publication | S3E 2023 Topical Area, 24th Conference on Practical Aspects of and Solutions for Software Engineering, KKIO 2023, and 8th Workshop on Advances in Programming Languages, WAPL 2023, Held as Part of FedCSIS 2023, Revised Selected Papers |
Editors | Aleksander Jarzębowicz, Ivan Luković, Adam Przybyłek, Mirosław Staroń, Muhammad Ovais Ahmad, Mirosław Ochodek |
Publisher | Springer Cham |
Pages | 129-152 |
Number of pages | 24 |
ISBN (Electronic) | 9783031510755 |
ISBN (Print) | 9783031510748 |
DOIs | |
Publication status | Published - 3 Jan 2024 |
Publication series
Name | Lecture Notes in Business Information Processing |
---|---|
Volume | 499 |
ISSN (Print) | 1865-1348 |
ISSN (Electronic) | 1865-1356 |
Keywords
- complier
- parallelism
- C++
- partial evaluation