PerfCoder: Large Language Models for Interpretable Code Performance Optimization
Abstract
Large language models (LLMs) have achieved remarkable progress in automatic code generation, yet their ability to produce highperformance code remains limited, despite its importance in real-world software systems.We argue that this limitation stems not only from data scarcity, but more fundamentally from the lack of supervision that guides interpretable and effective performance improvements.We introduce PerfCoder, a family of LLMs designed to generate performance-enhanced code through interpretable and customized optimization strategies.PerfCoder is fine-tuned on curated real-world optimization trajectories with human-readable annotations and further aligned via reinforcement fine-tuning using runtime feedback, enabling it to generate inputspecific strategies and apply them directly without iterative refinement.On the PIE code performance benchmark, PerfCoder outperforms all existing models in both runtime speedup and effective optimization rate, demonstrating that code performance optimization requires strategy awareness rather than scale alone.Moreover, PerfCoder produces interpretable feedback that can guide larger LLMs in a planneroptimizer workflow, substantially improving the performance of 32B models and GPT-5 on code optimization.
Fields of Study & Subjects
Parallel Computing and Optimization Techniques
Machine Learning in Materials Science
Software Engineering Research
Publication details
- Journal / source
- Findings of the Association for Computational Linguistics: ACL 2026
- Publisher
- Association for Computational Linguistics
- Pages
- 13807–13823
- Publication date
- 1 January 2026