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

手动和快速C代码优化

Manual and Fast C Code Optimization

Mohammed Fadle Abdulla

摘要:

通过代码优化来开发高性能的应用程序给程序员带来了更大的责任。虽然大多数现有的编译器试图自动优化程序代码,手动技术仍然是执行优化的主要方法。决定在哪里尝试优化代码是很困难的,特别是对于大型复杂的应用程序。对于手动优化,程序员可以使用他在编写代码时的经验,然后他可以使用软件分析器来收集和分析代码中的性能数据。在这项工作中,我们收集了可用于改进C语言程序编写风格的最多经验,并使用英特尔VTune分析器实现了代码的手动优化。本文包括两个案例研究来说明我们的堆排序和阶乘函数的优化。

英文摘要:

Developing an application with high performance through the code optimization places a greater responsibility on the programmers. While most of the existing compilers attempt to automatically optimize the program code, manual techniques remain the predominant method for performing optimization. Deciding where to try to optimize code is difficult, especially for large complex applications. For manual optimization, the programmers can use his experiences in writing the code, and then he can use a software profiler in order to collect and analyze the performance data from the code. In this work, we have gathered the most experiences which can be applied to improve the style of writing programs in C language as well as we present an implementation of the manual optimization of the codes using the Intel VTune profiler. The paper includes two case studies to illustrate our optimization on the Heap Sort and Factorial functions.

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

↑