摘要
随着嵌入式系统应用复杂度的提高,高效精简的软件代码是提高系统性能的关键因素之一。文章首先分析了嵌入式编程的特点,阐述了内联函数、循环展开、软件流水等几种代码优化方法,最后提出了应用行程编码(RLE)方法来减少常量数组对存储空间的占用。实验表明,经上述方法优化后的目标代码,执行效率提升了近50%,有效地提高了系统性能。
The paper analyzes the features of the embedded programming, and discusses the methods of code optimization such as inline function, loop unrolling and software pipeline. And a run length encoding method is proposed to compress the constant array.Experiment shows that this optimization code can improve system's performance and reduce the exection time to 50%.
出处
《自动化技术与应用》
2005年第12期18-21,共4页
Techniques of Automation and Applications