arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.07619cs.SE
收藏

重新思考大语言模型的代码性能基准测试

Rethinking Code Performance Benchmarks for LLMs

Concordia University(康科迪亚大学)

Nhat Minh Le, Yisen Xu, Zhijie Wang, Tse-Hsun, Chen

AI总结:

研究重新审视大语言模型代码性能基准测试,发现现有测试存在局限。提出基于LLM的多智能体框架生成性能导向测试,能更好暴露运行时差异,在原始测试无显著差异的任务中,该框架生成的测试有显著改进,优于当前最优技术。

摘要:

许多函数级性能基准测试被提出用于评估大语言模型(LLMs)能否生成高效程序。然而这些基准测试结果常显示LLM生成的实现与规范解决方案在执行时间上差异不大。本文重新审视四个流行基准测试:EffiBench、Enamel、EvalPerf和Mercury。在更严格设置下评估1538个任务,运行30次并通过统计测试评估规范解决方案与基准测试提供的高性能实现之间的运行时差异。结果表明不仅评估方法有局限,基准测试提供的性能测试也不够充分。为解决此局限,提出基于LLM的多智能体框架生成性能导向测试,能更有效暴露运行时差异。该框架使用三个独立智能体生成、诊断和修复确定性测试,在保持功能正确性的同时更好地暴露性能差异。在原始测试未发现显著性能差异的1345个基准测试任务中,该框架与DeepSeek-v3.1和GPT-4o生成的测试分别在24.01%和25.43%的任务中显示出统计上显著的改进,优于基于LLM的性能测试生成方法的当前最优技术。

英文摘要:

Many function-level performance benchmarks have been proposed to evaluate whether large language models (LLMs) can generate efficient programs. However, results on these benchmarks often show that LLM-generated implementations have little or no execution-time difference from canonical solutions. In this paper, we revisit four popular benchmarks: EffiBench, Enamel, EvalPerf, and Mercury. We evaluate 1,538 tasks under more rigorous setting by running each task 30 times and assessing the runtime differences between the canonical solutions and benchmark-provided performant implementations with statistical testing. With the benchmark-provided test suites, only 6.11% of the performant implementations are significantly faster than the canonical solutions. In a manual analysis of 308 non-significant tasks, 99 performant implementations contain no meaningful performance change, while 209 contain potential performance improvements that are not exposed by the original tests. These results suggest that the main limitation is not only the evaluation method, but also the limited sufficiency of the benchmark-provided performance tests. To address this limitation, we propose an LLM-based multi-agent framework to generate performance-oriented tests that expose runtime differences more effectively than the original tests. The framework uses three separate agents to generate, diagnose, and repair deterministic tests that preserve functional correctness while better exposing performance differences. Across 1,345 benchmark tasks for which the original tests found no significant performance difference, tests generated by our framework with DeepSeek-v3.1 and GPT-4o reveal statistically significant improvements in 24.01% and 25.43% of the tasks, respectively, outperforming the SOTA LLM-based performance test generation method.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑