Lu, H. and Xia, C. orcid.org/0000-0003-2014-5453 (2026) Agent-Agnostic End-to-End C/C++ Application Performance Optimization. In: ICS Workshops '26: Proceedings of the 40th ACM International Conference on Supercomputing - Workshop. ICS Workshops '26: 2026 International Conference on Supercomputing Workshops, 06-09 Jul 2026, Belfast, Northern Ireland, United Kingdom. Association for Computing Machinery (ACM), New York, NY, United States, pp. 65-69. ISBN: 979-8-4007-2300-1.
Abstract
The rise of large language model code agents—Claude Code, Gemini CLI, Codex CLI—has enabled developers to drive models through multi-step programming operations in real codebases via code agent interfaces. Existing work, however, has primarily applied these tools to functional tasks such as bug fixing and feature implementation, leaving performance engineering—a discipline that demands runtime evidence, domain expertise, and rigorous validation—largely unexplored. Moreover, most AI-assisted performance optimization approaches are tightly coupled to a specific model or interface, making them brittle in the face of rapid code agent evolution.
We propose a code agent-agnostic agentic scaffold for automated code performance optimization. The scaffold connects to mainstream model code agents through the Model Context Protocol (MCP) and is equipped with a procedural memory module (agent skill) that encodes the complete optimization control loop. This enables the system to autonomously execute the entire pipeline: project-level runtime analysis, hotspot identification and benchmark extraction, Abstract Syntax Tree (AST)-precise code localization, candidate patch generation, functional verification, performance measurement, and version rollback. When straightforward optimization strategies fail, the system escalates by invoking the Retrieval-Augmented Generation (RAG) tool in the MCP layer to retrieve structurally similar human optimization cases as reference patches.
We evaluate the system on the 10 CBench benchmark suite [7, 9], and experimental results show our methods can achieve 1.5 × speedup with 100% success rate. Furthermore, our methods can significantly reduce the token consumption comparing with baseline methods.
Metadata
| Item Type: | Proceedings Paper |
|---|---|
| Authors/Creators: |
|
| Copyright, Publisher and Additional Information: | Copyright © 2026 Copyright held by the owner/author(s). This work is licensed under a Creative Commons Attribution 4.0 International License. |
| Keywords: | large language models, performance engineering, code agents, agentic scaffolds, procedural memory, retrieval-augmented generation, profiling |
| Dates: |
|
| Institution: | The University of Leeds |
| Academic Units: | The University of Leeds > Faculty of Engineering & Physical Sciences (Leeds) > School of Computing (Leeds) > Distributed Systems & Services |
| Date Deposited: | 05 Aug 2026 08:31 |
| Last Modified: | 05 Aug 2026 08:41 |
| Published Version: | https://dl.acm.org/doi/10.1145/3774895.3812199 |
| Status: | Published |
| Publisher: | Association for Computing Machinery (ACM) |
| Identification Number: | 10.1145/3774895.3812199 |
| Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:244125 |
Download
Filename: Agent-Agnostic End-to-End CC++ Application PerformanceOptimization.pdf
Licence: CC-BY 4.0

CORE (COnnecting REpositories)
CORE (COnnecting REpositories)