FasterPy: An LLM-based Code Execution Efficiency Optimization Framework
Not on the map. Why?
Abstract (arXiv)
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 laborintensive 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 low-cost and efficient framework that adapts LLMs to optimize the execution efficiency of Python code. FasterPy combines Retrieval-Augmented Generation (RAG), supported by a knowledge base constructed from existing performance-improving code pairs and corresponding performance measurements, with Low-Rank Adaptation (LoRA) to enhance code optimization performance. Our experimental results on the Performance-Improving Code Edits (PIE) benchmark demonstrate the effectiveness of our method across multiple metrics. The FasterPy tool and the experimental results are available at https://github.com/WuYue22/fasterpy.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 40 of its 73 references that are in the map. First posted on arXiv 28 Dec 2025.
Builds on
40 of 73 references.
References · 40
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,236
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,212
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,304
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
28 more
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
- 2024Parameter-Efficient Fine-Tuning for Large Models: A Comprehensive Surveycited by 656
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2024SWIFT:A Scalable lightWeight Infrastructure for Fine-Tuningcited by 355
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2023A Rank Stabilization Scaling Factor for Fine-Tuning with LoRAcited by 243
- 2023Learning Performance-Improving Code Editscited by 106
- 2018A Survey on Compiler Autotuning using Machine Learningcited by 40
- 2024Improving Retrieval Augmented Language Model with Self-Reasoningcited by 28
- 2024Search-Based LLMs for Code Optimizationcited by 28
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 24
- 2023Supersonic: Learning to Generate Source Code Optimizations in C/C++cited by 16
- 2024Calibration of Large Language Models on Code Summarizationcited by 12
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
- 2025Towards Better Correctness and Efficiency in Code Generationcited by 9
- 2023PerfRL: A Small Language Model Framework for Efficient Code Optimizationcited by 8
- 2024An Empirical Study on Capability of Large Language Models in Understanding Code Semanticscited by 7
- 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimizationcited by 6
- 2022CSRS: Code Search with Relevance Matching and Semantic Matchingcited by 4
- 2024Investigating the Role of Prompting and External Tools in Hallucination Rates of Large Language Modelscited by 4
- 2023LLM Interactive Optimization of Open Source Python Libraries -- Case Studies and Generalizationcited by 3
- 2024A Reinforcement Learning Environment for Automatic Code Optimization in the MLIR Compilercited by 3
- 2025An Empirical Study on the Performance and Energy Usage of Compiled Python Codecited by 2
- 2025Pearl: Automatic Code Optimization Using Deep Reinforcement Learningcited by 2
- 2025SemOpt: LLM-Driven Code Optimization via Rule-Based Analysiscited by 2
- 2018Source Code Optimization using Equivalent Mutantscited by 1
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025LLM Program Optimization via Retrieval Augmented Search
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Models
- 2024Should AI Optimize Your Code? A Comparative Study of Classical Optimizing Compilers Versus Current Large Language Models
- 2025EffiBench-X: A Multi-Language Benchmark for Measuring Efficiency of LLM-Generated Code
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMs
- 2026ShortCoder: Knowledge-Augmented Syntax Optimization for Token-Efficient Code Generation