mlsanityData to 24 Nov 2026

Where Does the Performance Go? Understanding and Recovering Performance Regressions in C-to-Rust Translation

arXiv 2610.23044 ↗Submitted 16 Oct 2026cs.AI cs.PLcited by 0

Not on the map. Why?

Abstract (arXiv)

Rust is increasingly adopted as a memory-safe successor to C, and transpilers such as crust can migrate entire C projects while preserving their behavior. Preserving behavior, however, does not guarantee preserving performance. We study this gap on 20 real-world C projects and their crust translations. On the eight projects used for analysis, the translated Rust is more than 3% slower than the original C on 12 of 19 operations, by up to 62.2%. By comparing execution-cost profiles, optimized LLVM IR, and compiler optimization remarks across each C--Rust pair, we trace these slowdowns to nine recurring performance issues, spanning residual runtime work, missed compiler optimizations, and C-style source patterns, and derive an optimization direction for each. We then present ourtool, an LLM-based approach that encodes these issues as reusable optimization rules to recover the performance of translated Rust. ourtool profiles each project to locate hot functions and matches them against rule-specific patterns. The LLM then checks each rule's rewrite preconditions against the project context before rewriting, and a rewrite is kept only if it passes both functional and performance validation. On 41 operations from twelve held-out projects, ourtool preserves C outputs on all tested workloads and speeds up 40 operations over the crust translations, 18 of which end up faster than the original C. It outperforms the general-purpose coding agent codex on 31 of the 37 operations where both preserve C outputs, and outperforms its own variant without rule guidance on 34 of the 41 operations.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 24 of its 61 references that are in the map. Submitted 16 Oct 2026.

Builds on

24 of 61 references.

References · 24

  1. 2020Unsupervised Translation of Programming Languagescited by 270
  2. 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 251
  3. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 59
  4. 2024Towards Translating Real-World Code with LLMs: A Study of Translating to Rustcited by 37
  5. 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 34
  6. 2025C2SaferRust: Transforming C Projects into Safer Rust with NeuroSymbolic Techniquescited by 23
  7. 2024Syzygy: Dual Code-Test C to (safe) Rust Translation using LLMs and Dynamic Analysiscited by 21
  8. 2024Enhancing Code Translation in Language Models with Few-Shot Learning via Retrieval-Augmented Generationcited by 17
  9. 2023Ownership guided C to Rust translationcited by 15
  10. 2024Scalable, Validated Code Translation of Entire Projects using Large Language Modelscited by 15
  11. 2025RustMap: Towards Project-Scale C-to-Rust Migration via Program Analysis and LLMcited by 14
  12. 2024Translating C To Rust: Lessons from a User Studycited by 10
12 more
  1. 2025SafeTrans: LLM-assisted Transpilation from C to Rustcited by 10
  2. 2024To Tag, or Not to Tag: Translating C's Unions to Rust's Tagged Unionscited by 9
  3. 2023A Closer Look at the Security Risks in the Rust Ecosystemcited by 6
  4. 2025Raw Pointer Rewriting with LLMs for Translating C to Safer Rustcited by 6
  5. 2025Forcrat: Automatic I/O API Translation from C to Rust via Origin and Capability Analysiscited by 6
  6. 2025Project-Level C-to-Rust Translation via Pointer Knowledge Graphscited by 6
  7. 2025RepoTransAgent: Multi-Agent LLM Framework for Repository-Aware Code Translationcited by 5
  8. 2025SemOpt: LLM-Driven Code Optimization via Rule-Based Analysiscited by 4
  9. 2026Code Quality Analysis of Translations from C to Rustcited by 3
  10. 2022How ISO C became unusable for operating systems developmentcited by 2
  11. 2025C2RUST-BENCH: A Minimized, Representative Dataset for C-to-Rust Transpilation Evaluationcited by 2
  12. 2026Multi-Source and Cross-Scenario Strategy-Guided Code Optimizationcited by 2

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026AdaTrans: Automated C to Rust Transformation via Error-Adaptive Repair ↗
  2. 2026ENCRUST: Encapsulated Substitution and Agentic Refinement on a Live Scaffold for Safe C-to-Rust Translation
  3. 2026Fine-Tuning Qwen3-27B for C-to-Rust Code Translation: A Three-Stage Curriculum of Pretraining, Debugging-Aware SFT, and Task-Specific SFT
  4. 2024RustRepoTrans: Repository-level Code Translation Benchmark Targeting Rust
  5. 2026Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning
  6. 2026ORBIT: Guided Agentic Orchestration for Autonomous C-to-Rust Transpilation
  7. 2026From C to Idiomatic Rust: A Ship-of-Theseus Agentic Translation ↗
  8. 2026Mostly Automatic Translation of Language Interpreters from C to Safe Rust ↗