Saved in:
Bibliographic Details
Main Authors: Ren, Xiaoxue, Wan, Jun, Peng, Yun, Liu, Zhongxin, Liang, Ming, Chen, Dajun, Jiang, Wei, Li, Yong
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2510.17142
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914104867815424
author Ren, Xiaoxue
Wan, Jun
Peng, Yun
Liu, Zhongxin
Liang, Ming
Chen, Dajun
Jiang, Wei
Li, Yong
author_facet Ren, Xiaoxue
Wan, Jun
Peng, Yun
Liu, Zhongxin
Liang, Ming
Chen, Dajun
Jiang, Wei
Li, Yong
contents Large Language Models (LLMs) have demonstrated significant capability in code generation, but their potential in code efficiency optimization remains underexplored. Previous LLM-based code efficiency optimization approaches exclusively focus on function-level optimization and overlook interaction between functions, failing to generalize to real-world development scenarios. Code editing techniques show great potential for conducting project-level optimization, yet they face challenges associated with invalid edits and suboptimal internal functions. To address these gaps, we propose Peace, a novel hybrid framework for Project-level code Efficiency optimization through Automatic Code Editing, which also ensures the overall correctness and integrity of the project. Peace integrates three key phases: dependency-aware optimizing function sequence construction, valid associated edits identification, and efficiency optimization editing iteration. To rigorously evaluate the effectiveness of Peace, we construct PeacExec, the first benchmark comprising 146 real-world optimization tasks from 47 high-impact GitHub Python projects, along with highly qualified test cases and executable environments. Extensive experiments demonstrate Peace's superiority over the state-of-the-art baselines, achieving a 69.2% correctness rate (pass@1), +46.9% opt rate, and 0.840 speedup in execution efficiency. Notably, our Peace outperforms all baselines by significant margins, particularly in complex optimization tasks with multiple functions. Moreover, extensive experiments are also conducted to validate the contributions of each component in Peace, as well as the rationale and effectiveness of our hybrid framework design.
format Preprint
id arxiv_https___arxiv_org_abs_2510_17142
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PEACE: Towards Efficient Project-Level Efficiency Optimization via Hybrid Code Editing
Ren, Xiaoxue
Wan, Jun
Peng, Yun
Liu, Zhongxin
Liang, Ming
Chen, Dajun
Jiang, Wei
Li, Yong
Software Engineering
Large Language Models (LLMs) have demonstrated significant capability in code generation, but their potential in code efficiency optimization remains underexplored. Previous LLM-based code efficiency optimization approaches exclusively focus on function-level optimization and overlook interaction between functions, failing to generalize to real-world development scenarios. Code editing techniques show great potential for conducting project-level optimization, yet they face challenges associated with invalid edits and suboptimal internal functions. To address these gaps, we propose Peace, a novel hybrid framework for Project-level code Efficiency optimization through Automatic Code Editing, which also ensures the overall correctness and integrity of the project. Peace integrates three key phases: dependency-aware optimizing function sequence construction, valid associated edits identification, and efficiency optimization editing iteration. To rigorously evaluate the effectiveness of Peace, we construct PeacExec, the first benchmark comprising 146 real-world optimization tasks from 47 high-impact GitHub Python projects, along with highly qualified test cases and executable environments. Extensive experiments demonstrate Peace's superiority over the state-of-the-art baselines, achieving a 69.2% correctness rate (pass@1), +46.9% opt rate, and 0.840 speedup in execution efficiency. Notably, our Peace outperforms all baselines by significant margins, particularly in complex optimization tasks with multiple functions. Moreover, extensive experiments are also conducted to validate the contributions of each component in Peace, as well as the rationale and effectiveness of our hybrid framework design.
title PEACE: Towards Efficient Project-Level Efficiency Optimization via Hybrid Code Editing
topic Software Engineering
url https://arxiv.org/abs/2510.17142