{"slug": "cross-layer-characterization-and-ai-assisted-diagnosis-of-c-to-rust-performance", "title": "Cross-Layer Characterization and AI-Assisted Diagnosis of C-to-Rust Performance", "summary": "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.", "body_md": "# Computer Science > Performance\n\n  [Submitted on 24 Nov 2026]\n\n# Title:Cross-Layer Characterization and AI-Assisted Diagnosis of C-to-Rust Performance\n\n[View PDF](https://arxiv.org/pdf/2611.33490)\n\n[HTML (experimental)](https://arxiv.org/html/2611.33490v1)\n\nAbstract: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.\n    \n\n### Additional Features\n\n### Current browse context:\n\ncs.PF\n\n### References & Citations\n\nLoading...\n\n# Bibliographic and Citation Tools\n\nBibliographic Explorer \n\n*(*[What is the Explorer?](https://info.arxiv.org/labs/showcase.html#arxiv-bibliographic-explorer))\nConnected Papers \n\n*(*[What is Connected Papers?](https://www.connectedpapers.com/about))\nLitmaps \n\n*(*[What is Litmaps?](https://www.litmaps.co/))\nscite Smart Citations \n\n*(*[What are Smart Citations?](https://www.scite.ai/))\n# Code, Data and Media Associated with this Article\n\nalphaXiv \n\n*(*[What is alphaXiv?](https://alphaxiv.org/))\nCatalyzeX Code Finder for Papers \n\n*(*[What is CatalyzeX?](https://www.catalyzex.com))\nDagsHub \n\n*(*[What is DagsHub?](https://dagshub.com/))\nGotit.pub \n\n*(*[What is GotitPub?](http://gotit.pub/faq))\nHugging Face \n\n*(*[What is Huggingface?](https://huggingface.co/huggingface))\nScienceCast \n\n*(*[What is ScienceCast?](https://sciencecast.org/welcome))\n# Demos\n\n# Recommenders and Search Tools\n\nInfluence Flower \n\n*(*[What are Influence Flowers?](https://influencemap.cmlab.dev/))\nCORE Recommender \n\n*(*[What is CORE?](https://core.ac.uk/services/recommender))\n# arXivLabs: experimental projects with community collaborators\n\narXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.\n\nBoth 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.\n\nHave an idea for a project that will add value for arXiv's community? [**Learn more about arXivLabs**](https://info.arxiv.org/labs/index.html).", "url": "https://wpnews.pro/news/cross-layer-characterization-and-ai-assisted-diagnosis-of-c-to-rust-performance", "canonical_source": "https://arxiv.org/abs/2611.33490", "published_at": "2026-11-27 10:36:28+00:00", "updated_at": "2026-11-27 10:43:03.079849+00:00", "lang": "en", "topics": ["ai-research", "artificial-intelligence", "developer-tools"], "entities": ["arXiv", "Rust", "C", "FerroScope", "LLVM"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/cross-layer-characterization-and-ai-assisted-diagnosis-of-c-to-rust-performance", "markdown": "https://wpnews.pro/news/cross-layer-characterization-and-ai-assisted-diagnosis-of-c-to-rust-performance.md", "text": "https://wpnews.pro/news/cross-layer-characterization-and-ai-assisted-diagnosis-of-c-to-rust-performance.txt", "jsonld": "https://wpnews.pro/news/cross-layer-characterization-and-ai-assisted-diagnosis-of-c-to-rust-performance.jsonld"}}