少即是多:利用标准的存储器优化级别实现更好的性能和能耗
Less is More: Exploiting the Standard Compiler Optimization Levels for Better Performance and Energy Consumption
摘要:
本文提出了一个有趣的观察,通过执行较少的优化,在一个标准的编译器优化级别,如-O2,同时保持其原始顺序,可以实现显着节省执行时间和能源消耗。这一观察结果已经在两个嵌入式处理器上得到了验证,即ARM Cortex-M0和ARM Cortex-M3,使用了两个不同版本的LLVM编译框架; v3.8和v5.0。71个嵌入式基准测试的实验评估表明,两种处理器的基准测试中至少有一半的性能有所提高。在所有基准测试中,Cortex-M0和Cortex-M3处理器的平均执行时间分别减少了2.4%和5.3%,与-O2相比,执行时间的改善幅度从1%到90%不等。可以实现的节省与使用迭代编译或机器学习来选择标志或确定导致更高效代码的相位排序的最新编译方法可以实现的节省在相同的范围内。与这些耗时且昂贵的应用技术相比,我们的方法只需要测试有限数量的优化配置,少于64个,就可以获得类似甚至更好的节省。此外,我们的方法可以支持多标准优化,因为它同时针对执行时间,能耗和代码大小。
英文摘要:
This paper presents the interesting observation that by performing fewer of the optimizations available in a standard compiler optimization level such as -O2, while preserving their original ordering, significant savings can be achieved in both execution time and energy consumption. This observation has been validated on two embedded processors, namely the ARM Cortex-M0 and the ARM Cortex-M3, using two different versions of the LLVM compilation framework; v3.8 and v5.0. Experimental evaluation with 71 embedded benchmarks demonstrated performance gains for at least half of the benchmarks for both processors. An average execution time reduction of 2.4% and 5.3% was achieved across all the benchmarks for the Cortex-M0 and Cortex-M3 processors, respectively, with execution time improvements ranging from 1% up to 90% over the -O2. The savings that can be achieved are in the same range as what can be achieved by the state-of-the-art compilation approaches that use iterative compilation or machine learning to select flags or to determine phase orderings that result in more efficient code. In contrast to these time consuming and expensive to apply techniques, our approach only needs to test a limited number of optimization configurations, less than 64, to obtain similar or even better savings. Furthermore, our approach can support multi-criteria optimization as it targets execution time, energy consumption and code size at the same time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。