Rethinking Code Refinement: Learning to Judge Code Efficiency
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated impressive capabilities in understanding and generating codes. Due to these capabilities, many recent methods are proposed to automatically refine the codes with LLMs. However, we should rethink that the refined codes (from LLMs and even humans) are not always more efficient than their original versions. On the other hand, running two different versions of codes and comparing them every time is not ideal and time-consuming. Therefore, in this work, we propose a novel method based on the code language model that is trained to judge the efficiency between two different codes (generated across humans and machines) by either classifying the superior one or predicting the relative improvement. We validate our method on multiple programming languages with multiple refinement steps, demonstrating that the proposed method can effectively distinguish between more and less efficient versions of code.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 0 of its 29 references that are in the map. First posted on arXiv 29 Oct 2024.
Builds on
0 of 29 references.
No references here yet.
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025RefineCoder: Iterative Improving of Large Language Models via Adaptive Critique Refinement for Code Generation
- 2024An Empirical Study on the Code Refactoring Capability of Large Language Models
- 2025CodeReviewQA: The Code Review Comprehension Assessment for Large Language Models
- 2025code_transformed: The Influence of Large Language Models on Code
- 2024Code Repair with LLMs gives an Exploration-Exploitation Tradeoff
- 2025Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning
- 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
- 2024CodeLutra: Boosting LLM Code Generation via Preference-Guided Refinement