c++

Implementing performance- or systems-critical software in modern C++ requires mastery of templates, RAII, smart pointers, move semantics and the STL, compiling with g++/clang/MSVC, configuring builds with CMake, and debugging/profiling with gdb, AddressSanitizer, and performance tools.

c++

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

Existing benchmarks for C++ performance repair are often based on competitive programming code or focus on other languages, lacking executable, real-world evaluation data. This work proposes CppPerf-Mine, an automated pipeline that mines genuine performance-improving commits from GitHub repositories and constructs CppPerf-DB—the first large-scale, multi-file, reproducible dataset of C++ performance enhancements. The pipeline integrates structured filtering, large language model–based classification, and Dockerized build-and-test validation. CppPerf-DB comprises 347 human-verified patches spanning 42 mature projects, with 39% involving modifications across multiple files. Preliminary evaluation shows that OpenHands, a state-of-the-art tool, successfully repairs only 13.5% of the cases, underscoring the dataset’s critical value for advancing repository-level performance repair research.

automated program repairbenchmark datasetC++ performance bugs

To address the manual selection of AoS (Array of Structures) versus SoA (Structure of Arrays) memory layouts in C++, which compromises both performance and maintainability, this paper proposes a C++ language extension based on attributes and a compiler-level dynamic layout optimization mechanism. Implemented as a Clang plugin, it enables runtime adaptive switching between AoS and SoA, automatically handling data format conversion, result write-back, and GPU offloading—thereby decoupling data structures from computational logic at the algorithmic level. The approach delivers transparent optimization across heterogeneous platforms, including x86 (Intel/ARM) CPUs and NVIDIA Grace-Hopper systems. Evaluated on an SPH physics simulation benchmark, it achieves significant computational speedup while preserving code conciseness and developer productivity. Its novelty lies in compiler-driven, dynamic memory layout decisions and a unified heterogeneous memory view abstraction.

Compiler-guided GPU offloadingDynamic AoS-to-SoA conversionOptimizing memory arrangement in C++

C++ faces critical limitations in HPC—including poor memory efficiency (inability to exploit range information from integers, enums, or bitsets for layout optimization), lack of automatic MPI datatype derivation, and no native support for arbitrary-precision floating-point arithmetic. This paper introduces a compiler-aware, memory-centric language extension for C++, implemented via lightweight LLVM-based attribute annotations. The extension enables bit-field packing, finite-precision floating-point modeling, and automatic MPI datatype generation for struct subsets—while preserving full standard C++ compatibility. It thus achieves fine-grained memory layout optimization and seamless MPI semantic embedding. Evaluated on an SPH numerical simulation benchmark, the approach reduces memory footprint, improves cache locality, accelerates MPI serialization, and significantly decreases manual memory alignment and communication “glue” code.

Optimizing data storage for booleans, integers, and floating-point numbersReducing memory footprints in C++ for HPC applicationsStreamlining MPI development with memory-centric specifications

Cppless: Productive and Performant Serverless Programming in C++

Jan 19, 2024
LM
Lukas Möller
🏛️ ETH Zurich

C++ developers face significant challenges in efficiently leveraging serverless computing due to cumbersome deployment workflows, poor compatibility between client-side code and cloud execution environments, and the absence of strong typing guarantees for I/O data. To address these issues, this paper introduces the first lightweight, LLVM-based C++ serverless framework. It requires only two compiler extensions to automatically extract function objects, generate type-safe serialization/deserialization code, and orchestrate cloud deployment and RPC invocation—enabling end-to-end, single-source-code support with zero runtime overhead. The framework integrates LLVM IR analysis, C++ template metaprogramming, and a lightweight serialization mechanism. Evaluated on real-world applications, it achieves up to 30× parallel speedup, imposes minimal code intrusion, and reduces per-invocation cost to under one cent.

Achieving high-performance parallel computation offloadingEnabling single-source serverless programming in C++Simplifying deployment and compatibility for C++ functions

This work addresses the challenge of manually repairing implicit data loss compiler warnings in industrial-scale C++ projects by proposing an automated approach based on large language models (LLMs). The method leverages the Language Server Protocol and Tree-sitter to precisely extract code context, enabling intelligent decisions on whether range checks are necessary and generating performance-conscious repair code. As the first study to apply LLMs to this specific problem, the system achieves a 92.73% human-review acceptance rate on real-world projects, reduces auxiliary instruction overhead by 39.09% compared to baseline methods, and produces fixes whose runtime performance closely approximates that of optimal human-written solutions—differing by only 13.56%.

C++code repaircompiler warnings

Latest Papers

What's happening recently
View more

This work addresses the longstanding tension in systems programming languages between physical transparency and compile-time memory safety: C++ lacks enforced safety boundaries, while Rust imposes high cognitive overhead through complex lifetime annotations. To reconcile these concerns, we propose and implement Toka, a novel language featuring an innovative Handle-Soul dual model that syntactically decouples pointer identities (Handles) from their underlying values (Souls), thereby eliminating semantic ambiguity between pointers and values. This design explicitly encodes resource semantics—supporting unique, shared, borrowed, and raw resource modes—and integrates them with compile-time lifetime checking. As a result, Toka significantly reduces the cognitive burden and annotation complexity of memory-safe programming while preserving near-zero runtime overhead and minimal binary size.

lifetime annotationsmemory safetyphysical transparency

This work addresses the fragmentation in current C/C++ pointer analysis tooling by proposing the first modular pointer analysis framework. By decoupling intermediate representation (IR) construction, constraint generation, solver backends, and client queries, the framework enables plug-and-play integration and systematic comparison of diverse alias analysis algorithms—including flow- and context-sensitive as well as insensitive variants—while explicitly exposing the trade-offs between precision and performance. The design supports multiple solvers and query interfaces, achieving up to a 2.91× speedup over SVF on GNU coreutils. Furthermore, the framework has been successfully deployed in industrial-scale static analysis and fuzzing tools, leading to the discovery of over one thousand real-world vulnerabilities.

alias analysisC/C++modular framework

Achieving zero-cost specialization remains a fundamental challenge in programming language and compiler design. It often necessitates trade-offs between expressive power and type system soundness, as the interaction between conditional compilation and static dispatch can easily lead to unforeseen coherence violations and increased complexity in the formal model. This paper introduces meta-monomorphizing specializations, a novel framework that achieves specialization by repurposing monomorphization through compile-time metaprogramming. Instead of modifying the host compiler, our approach generates meta-monomorphized traits and implementations that encode specialization constraints directly into the type structure, enabling deterministic, coherent dispatch without overlapping instances. We formalize this method for first-order, predicate-based, and higher-ranked polymorphic specialization, also in presence of lifetime parameters. Our evaluation, based on a Rust implementation using only existing macro facilities, demonstrates that meta-monomorphization enables expressive specialization patterns -- previously rejected by the compiler -- while maintaining full compatibility with standard optimization pipelines. We show that specialization can be realized as a disciplined metaprogramming layer, offering a practical, language-agnostic path to high-performance abstraction. A comprehensive study of public Rust codebases further validates our approach, revealing numerous workarounds that meta-monomorphization can eliminate, leading to more idiomatic and efficient code.

coherence violationsmonomorphizationstatic dispatch

This study addresses the immature compiler support for automatic vectorization on real hardware implementing the RISC-V Vector Extension (RVV 1.0), which limits its performance in scientific computing and machine learning. We present the first systematic evaluation of automatic vectorization capabilities in GCC 15 and LLVM 21 on RVV hardware, combining assembly-level microbenchmarks, perf counter calibration, and comparative experiments between manual and compiler-generated vectorization using the Qsim quantum simulator. Our analysis reveals that key performance bottlenecks—such as predicate overhead and strided memory accesses—are inadequately modeled by current cost models, while default LMUL selection is already near-optimal. Experimental results show GCC 15 outperforms LLVM 21 in four of six proxy applications; LLVM’s advantage in SGEMM/DGEMM stems from aggressive instruction reduction, highlighting both compilers’ insufficient handling of complex memory access patterns.

autovectorizationcompiler supportmemory access patterns

This work addresses the inefficiencies of the edit-compile-reload cycle in audio DSP development and the loss of parameter bindings caused by structural changes in DSP code. To resolve these issues, the authors propose a dual-mode CLAP plugin compilation system for the Faust language that integrates static ahead-of-time (AOT) compilation with dynamic interpreted execution. The system introduces an innovative address-based parameter identity matching algorithm and a stable slot allocation mechanism, enabling runtime hot reloading while preserving consistent parameter identities and host automation bindings. As the first officially integrated Faust-to-CLAP compilation pathway, the implementation achieves significant gains in development iteration speed and parameter stability with only approximately 2,400 lines of C++/Python code.

audio software developmentDSP code modificationedit-compile-reload cycle

Hot Scholars

KK

Konstantin Korovin

The University of Manchester, Depratement of Computer Science
Automated ReasoningVerificationLogicFormal Methods
LC

Lucas C. Cordeiro

Professor of Computer Science, University of Manchester
Formal MethodsAutomated VerificationSoftware TestingProgram Synthesis
CW

Chengpeng Wang

Purdue University
AI for CodeProgram AnalysisSoftware Engineering