Rethinking Code Refinement: Learning to Judge Code Efficiency
Minju Seo, Jinheon Baek, Sung Ju Hwang

TL;DR
This paper introduces a new approach using code language models to efficiently evaluate and compare the efficiency of different code versions, reducing the need for time-consuming execution comparisons.
Contribution
It proposes a novel method for judging code efficiency with language models, eliminating the need for running multiple code versions for comparison.
Findings
Effective distinction between more and less efficient code versions
Validated across multiple programming languages and refinement steps
Reduces time-consuming code execution comparisons
Abstract
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…
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
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsPower Systems and Technologies · Advanced Computational Techniques and Applications
