cd /news/ai-research/cross-layer-characterization-and-ai-… · home › topics › ai-research › article
[ARTICLE · art-177217] src=arxiv.org ↗ pub= topic=ai-research verified=true sentiment=↑ positive

Cross-Layer Characterization and AI-Assisted Diagnosis of C-to-Rust Performance

A paper submitted to arXiv on 24 November 2026 reports that across 8 of 12 benchmarks, at least one Rust implementation performs within 10% of its C counterpart or outperforms it, undercutting the assumption that Rust's runtime safety checks dominate migration overhead. The authors introduce FerroScope, an AI-assisted performance debugger combining source-level analysis, compiler optimization remarks, dynamic instruction traces and hardware performance counters, and use its diagnoses to build an LLVM compiler pass that hoists redundant bounds checks via guarded loop versioning while preserving Rust's panic behavior. That pass cut Selection Sort's overhead from 2.95x to 1.00x and improved Merge Sort from 1.43x to 0.91x relative to C.

key takeaway

Across 8 of 12 benchmarks at least one Rust implementation landed within 10% of C or faster, and an LLVM pass hoisting redundant bounds checks through guarded loop versioning cut Selection Sort's overhead from 2.95x to 1.00x and Merge Sort's from 1.43x to 0.91x.

read2 min views4 publishedNov 27, 2026
Cross-Layer Characterization and AI-Assisted Diagnosis of C-to-Rust Performance
Image: source
  [Submitted on 24 Nov 2026]


[View PDF](https://arxiv.org/pdf/2611.33490)

[HTML (experimental)](https://arxiv.org/html/2611.33490v1)

Abstract:Migrating C code to Rust can significantly improve software security, but understanding the performance implications of such migrations remains challenging. While Rust is often claimed to match C's performance, runtime safety checks, compiler optimizations, and hardware microarchitecture interact in ways that complicate performance diagnosis. We first conduct a systematic cross-layer characterization of 12 benchmarks comprising C implementations and their Rust counterparts. Our study reveals that runtime safety checks do not necessarily dominate performance overhead, as compiler and microarchitectural optimizations often mitigate their costs. Across 8 of the 12 benchmarks, at least one Rust implementation performs within 10% of its C counterpart or outperforms it. Motivated by these findings, we introduce FerroScope, an AI-assisted performance debugger that integrates source-level analysis, compiler optimization remarks, dynamic instruction traces, and hardware performance counters to diagnose performance differences between C and Rust. FerroScope reproduces our manual findings while providing more precise explanations in several cases, including identifying compiler optimizations inhibited by redundant bounds checks. Guided by these diagnoses, we develop an LLVM compiler pass that hoists redundant bounds checks through guarded loop versioning while preserving Rust's panic behavior. The pass enables downstream compiler optimizations, including loop unrolling and conditional-move conversion, reducing Selection Sort's overhead from 2.95x to 1.00x and improving Merge Sort from 1.43x to 0.91x relative to C. Together, our results demonstrate how cross-layer performance characterization and AI-assisted diagnosis can guide safety-preserving compiler optimizations for efficient C-to-Rust migration.

Additional Features

Current browse context:

cs.PF

References & Citations

...

Bibliographic Explorer

(What is the Explorer?) Connected Papers

(What is Connected Papers?) Litmaps

(What is Litmaps?) scite Smart Citations

(What are Smart Citations?) alphaXiv

(What is alphaXiv?) CatalyzeX Code Finder for Papers

(What is CatalyzeX?) DagsHub

(What is DagsHub?) Gotit.pub

(What is GotitPub?) Hugging Face

(What is Huggingface?) ScienceCast

(What is ScienceCast?) Influence Flower

(What are Influence Flowers?) CORE Recommender

(What is CORE?) arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

── more in #ai-research 4 stories · sorted by recency
── more on @arxiv 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cross-layer-characte…] indexed:0 read:2min 2026-11-27 · —