FasterPy: An LLM-based Code Execution Efficiency Optimization Framework
Yue Wu, Minghao Han, Ruiyin Li, Peng Liang, Amjed Tahir, Zengyang Li, Qiong Feng, Mojtaba Shahin

TL;DR
FasterPy is a novel framework leveraging LLMs, RAG, and LoRA to efficiently optimize Python code performance, outperforming existing models on the PIE benchmark with low development costs.
Contribution
This work introduces FasterPy, combining retrieval-augmented generation and low-rank adaptation to improve code optimization using LLMs, with demonstrated superior performance on benchmark datasets.
Findings
Outperforms existing models on the PIE benchmark
Uses RAG and LoRA to enhance code optimization
Provides a low-cost, scalable solution for Python code efficiency
Abstract
Code often suffers from performance bugs. These bugs necessitate the research and practice of code optimization. Traditional rule-based methods rely on manually designing and maintaining rules for specific performance bugs (e.g., redundant loops, repeated computations), making them labor-intensive and limited in applicability. In recent years, machine learning and deep learning-based methods have emerged as promising alternatives by learning optimization heuristics from annotated code corpora and performance measurements. However, these approaches usually depend on specific program representations and meticulously crafted training datasets, making them costly to develop and difficult to scale. With the booming of Large Language Models (LLMs), their remarkable capabilities in code generation have opened new avenues for automated code optimization. In this work, we proposed FasterPy, a…
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.
Taxonomy
TopicsSoftware System Performance and Reliability · Software Testing and Debugging Techniques · Software Engineering Research
