提出了一种轻权的大程序优化方法——基于代码隔离的迭代编译优化方法,并采用该方法对程序的性能进行测试,结合代码隔离技术,从大程序中分离若干以循环结构为主、性能不相关或相关度较低的核心代码片断,逐个对其进行迭代编译优化搜索,进而更加有效地优化核心代码段.结果表明,所提出的方法可以提高整个程序的性能,可将一个高维的优化空间转换为多个低维优化空间而降低迭代编译的优化开销,是一种易于实现且适合通用代码迭代编译的大程序优化方法.
A lightweight large programs optimization method, code isolation based iterative compilation was proposed, which isolated kernel code segments from original scientific and engineering codes, organized them into source files, and then optimized these isolated codes using iterative compilation separately. In this way, different kernel code segments could be optimized with specific optimization configuration; there- fore, it optimized programs more effectively and boosted the whole programs' performance. Meanwhile, the multi-dimensional optimization space was split into several lower-dimensional optimization spaces, and the optimization cost was reduced. The experimental results show that it is a low-weight and easy-to-im- plement method for large programs, and it is also suitable for general code optimization.