EffiPair: Improving the Efficiency of LLM-generated Code with Differential Execution Feedback
Hajizadeh, Samira, Jana, Suman
–arXiv.org Artificial Intelligence
Such differences matter when generated code is repeatedly executed, incorporated into larger software systems, or deployed at scale, where seemingly small inefficiencies can accumulate into significant overhead. Improving the efficiency of LLM-generated code is therefore an increasingly important dimension of code generation alongside functional correctness. Recent work treats program efficiency as an explicit optimization objective. Benchmarks such as EffiBench (Huang et al., 2025b) reveal substantial efficiency gaps between model-generated and expert implementations, motivating a growing class of inference-time methods that execute candidate programs and return runtime, memory, or profiling feedback to guide refinement (Huang et al., 2025a; Peng et al., 2024; Ye et al., 2025). The central challenge, however, is converting this evidence into a useful implementation change. Existing inference-time refinement approaches largely provide feedback pointwise: runtime measurements reveal how costly an implementation is, and profiles identify where that cost occurs, but neither directly indicates how the computation should change. The model must therefore infer the performance-improving transformation from an isolated diagnosis, even though alternative implementations of the same computation may already provide useful comparative evidence. Our key observation is that alternative implementations can turn execution feedback from a diagnosis into a direction for refinement. Consider two functionally equivalent programs that are structurally similar but substantially separated in execution cost.
arXiv.org Artificial Intelligence
Sep-29-2026