EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimization
Dong Huang, Jianbo Dai, Han Weng, Puzhen Wu, Yuhao Qing, Heming Cui, Zhijiang Guo, Jie M.Zhang

TL;DR
EffiLearner is a self-optimization framework that iteratively improves the efficiency of code generated by large language models by profiling execution and revising code accordingly.
Contribution
This paper introduces EffiLearner, a novel self-optimization approach that uses execution profiles to enhance the efficiency of LLM-generated code through iterative refinement.
Findings
Execution time reduced by up to 87.1%.
Memory usage decreased by up to 90.8%.
Significant efficiency improvements across multiple models and benchmarks.
Abstract
Large language models (LLMs) have shown remarkable progress in code generation, but their generated code often suffers from inefficiency, resulting in longer execution times and higher memory consumption. To address this issue, we propose \textbf{EffiLearner}, a self-optimization framework that utilizes execution overhead profiles to improve the efficiency of LLM-generated code. EffiLearner first generates code using an LLM, then executes it locally to capture execution time and memory usage profiles. These profiles are fed back to the LLM, which then revises the code to reduce overhead. To evaluate the effectiveness of EffiLearner, we conduct extensive experiments on the EffiBench, HumanEval, and MBPP with 16 open-source and 6 closed-source models. Our evaluation results demonstrate that through iterative self-optimization, EffiLearner significantly enhances the efficiency of…
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.
Code & Models
Videos
Taxonomy
TopicsParallel Computing and Optimization Techniques · Embedded Systems Design Techniques · Distributed and Parallel Computing Systems
