CodeEvolve: LLM 기반 진화적 최적화 - 런타임 정보를 활용한 타겟 선택을 통한 다국어 코드 개선
CodeEvolve: LLM-Driven Evolutionary Optimization with Runtime-Enriched Target Selection for Multi-Language Code Enhancement
본 논문에서는 대규모 언어 모델(LLM)을 활용하여 프로그램 성능 및 코드 품질을 향상시키는 진화적 프레임워크인 CodeEvolve를 제시합니다. CodeEvolve는 OpenEvolve를 확장하여 런타임 정보를 기반으로 한 타겟 선택, 몬테카를로 트리 탐색(MCTS), 자동 코드 개선, 그리고 Java 및 Salesforce Apex에 대한 언어별 평가 파이프라인을 제공합니다. 본 시스템은 Java Flight Recorder (JFR) 프로파일을 사용하여 가중치 기반 구성 그래프를 구축하고, 실행 비용이 가장 큰 부분을 고려하여 최적화 타겟을 선택함으로써 수동으로 병목 현상을 식별하는 데 대한 의존성을 줄입니다. 각 타겟에 대해 CodeEvolve는 후보 수정 사항을 생성하고, 빌드 검증, 단위 테스트, 성능 검사, 정적 분석 및 LLM 기반 리뷰를 통해 이를 평가하며, 기능적 정확성을 유지하는 변형만 유지합니다. 실제 최적화 작업에서 CodeEvolve는 성능 및 코드 지표를 개선하면서도 정확성을 유지합니다. 대규모 엔터프라이즈 Java 코드베이스에서 CodeEvolve는 평균 15.22배의 속도 향상을 달성했으며, 단일 패스 LLM 최적화보다 다섯 가지 주요 함수에서 더 우수한 성능을 보였습니다. Apex 최적화에 대한 분석 결과, MCTS를 완벽하게 적용한 설정에서 평균적으로 20개의 프로그램 중 19.5개의 유효한 프로그램을 생성했으며, 이는 탐색, 필터링 및 개선 과정이 보다 안정적인 최적화에 기여한다는 것을 나타냅니다.
We present CodeEvolve, an evolutionary framework for improving program performance and code quality with Large Language Models (LLMs). CodeEvolve extends OpenEvolve with runtime-guided target selection, Monte Carlo Tree Search (MCTS), automated code refinement, and language-specific evaluation pipelines for Java and Salesforce Apex. The system uses Java Flight Recorder (JFR) profiles to build weighted component graphs and select optimization targets that account for most execution cost, reducing reliance on manual bottleneck identification. For each target, CodeEvolve generates candidate edits, evaluates them through build validation, unit tests, performance checks, static analysis, and LLM-based review, and retains only variants that preserve functional correctness. Across real-world optimization tasks, CodeEvolve improves performance and code metrics while maintaining correctness. On a large enterprise Java codebase, it achieves an average speedup of 15.22$\times$ across seven hotspot functions and outperforms single-pass LLM optimization on five of them. An ablation study on Apex optimization shows that the full MCTS-augmented configuration produces 19.5 valid programs out of 20 on average, indicating that search, filtering, and refinement each contribute to more reliable optimization.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.