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

基于数据驱动的代码优化分析

A Data-driven Analysis of Code Optimizations

New York University Abu Dhabi(阿布扎比纽约大学)

Yacine Hakimi, Riyadh Baghdadi

AI总结:

本文通过数据驱动方法生成大规模随机程序并应用随机优化序列,统计分析变换顺序对性能的影响,为设计更高效的自动代码优化算法提供指导。

摘要:

随着对计算能力需求的增长,通过编译器优化代码变得越来越关键。在此背景下,我们聚焦于全自动代码优化技术,这些技术无需人工干预即可自动完成代码变换的选择与应用过程,以获得更好的性能。理解这些变换的行为方式及其相互作用,是设计更有效优化策略的关键。编译器开发者在构建这些启发式方法时必须做出大量设计选择。例如,他们需要决定是允许以任意顺序探索变换,还是强制执行固定顺序。前者在理论上可能带来最佳性能提升,但会显著增大搜索空间。这引出一个重要问题:预定义的固定变换应用顺序能否在不严重损害优化潜力的前提下加速搜索?在本文中,我们探讨了这一问题以及自动代码优化算法设计中出现的其他相关问题。我们采用数据驱动的方法,生成一个大规模随机程序数据集,对其应用随机优化序列,并记录其执行时间。通过统计分析,我们提供了有助于指导更高效自动代码优化算法开发的见解。

英文摘要:

As the demand for computational power grows, optimizing code through compilers becomes increasingly crucial. In this context, we focus on fully automatic code optimization techniques that automate the process of selecting and applying code transformations for better performance without manual intervention. Understanding how these transformations behave and interact is key to designing more effective optimization strategies. Compiler developers must make numerous design choices when constructing these heuristics. For instance, they may decide whether to allow transformations to be explored in any arbitrary order or to enforce a fixed sequence. While the former may theoretically offer the best performance gains, it significantly increases the search space. This raises an important question: Can a predefined, fixed order of applying transformations speed up the search without severely compromising optimization potential? In this paper, we address this and other related questions that arise in the design of automatic code optimization algorithms. Using a data-driven approach, we generate a large dataset of random programs, apply random optimization sequences, and record their execution times. Through statistical analysis, we provide insights that guide the development of more efficient automatic code optimization algorithms.

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

↑