PerfCoder: Large Language Models for Interpretable Code Performance Optimization
Jiuding Yang, Shengyao Lu, Hongxuan Liu, Shayan Shirahmad Gale Bagi, Zahra Fazel, Tomasz Czajkowski, Di Niu

TL;DR
PerfCoder is a specialized large language model designed to generate interpretable, performance-optimized code by learning from real-world optimization data and reinforcement fine-tuning, significantly improving code speed and optimization strategies.
Contribution
Introducing PerfCoder, a fine-tuned LLM that produces interpretable, input-specific code optimizations, surpassing existing models in runtime speedup and effectiveness.
Findings
PerfCoder outperforms all existing models on the PIE benchmark.
It can generate interpretable feedback to guide further optimization.
Elevates 32B models and GPT-5 to new levels in code performance optimization.
Abstract
Large language models (LLMs) have achieved remarkable progress in automatic code generation, yet their ability to produce high-performance code remains limited--a critical requirement in real-world software systems. We argue that current LLMs struggle not only due to data scarcity but, more importantly, because they lack supervision that guides interpretable and effective performance improvements. In this work, we introduce PerfCoder, a family of LLMs specifically designed to generate performance-enhanced code from source code via interpretable, customized optimizations. PerfCoder is fine-tuned on a curated collection of real-world optimization trajectories with human-readable annotations, and preference-aligned by reinforcement fine-tuning using runtime measurements, enabling it to propose input-specific improvement strategies and apply them directly without relying on iterative…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
