EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) can generate functionally correct programs that differ substantially in execution efficiency. Existing inference-time optimization methods typically refine each candidate using pointwise runtime or profiling feedback, which identifies how costly an implementation is or where the cost arises, but offers limited guidance on how the computation should change. We introduce DIFFERENTIAL EXECUTION FEEDBACK (DEF), which compares implementations that are nearby in structural program space but separated in performance, turning their execution and implementation differences into directional optimization evidence. We demonstrate DEF in EffiPair, a training-free, test-time framework that pairs structurally similar programs with different efficiencies, distills their relative execution behavior into compact feedback, and iteratively refines a candidate pool. Across EvalPerf, Mercury, and ENAMEL, using GPT-4o mini, DeepSeek-V4.1 Flash, and GPT-5 mini, EffiPair achieves the highest value on each benchmark's official efficiency metric in all nine model-benchmark settings under matched evaluation conditions. Moreover, two contrastive refinement rounds improve efficiency over the selected initial draft in every setting while preserving or improving Pass@1. These results demonstrate the effectiveness of relational execution feedback as a lightweight signal for test-time code optimization.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 16 of its 25 references that are in the map. First posted on arXiv 6 Apr 2026.
Builds on
16 of 25 references.
References · 16
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2024Evaluating Language Models for Efficient Code Generationcited by 69
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 46
- 2024LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluationcited by 46
- 2024How Efficient is LLM-Generated Code? A Rigorous & High-Standard Benchmarkcited by 39
- 2024Mercury: A Code Efficiency Benchmark for Code Large Language Modelscited by 34
- 2025SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?cited by 33
- 2024EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimizationcited by 28
- 2024ECCO: Can We Improve Model-Generated Code Efficiency Without Sacrificing Functional Correctness?cited by 25
- 2025GSO: Challenging Software Optimization Tasks for Evaluating SWE-Agentscited by 24
4 more
- 2024PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedbackcited by 22
- 2024Code-Optimise: Self-Generated Preference Data for Correctness and Efficiencycited by 16
- 2024EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuningcited by 15
- 2025LLM4EFFI: Leveraging Large Language Models to Enhance Code Efficiency and Correctnesscited by 10
Built on by
Not cited yet.