编辑: AA003 2016-12-28

s functionality is ver- ified, profile and disassemble the objects. Look for and optimize the following: - Sections of code that are executed most frequently - Sections of code that take the most CPU cycles to execute - Inefficiencies in assembly code from the compilation When optimizing these sections keep in mind the following general concepts of code optimization: - Avoid Redundancy - store computations rather than recomputing them - Serialize Code - code should be designed with a minimum amount of branching. Code branching is expensive. The ARM920T does not support branch prediction - Code Locality - code executed closely together in time should be placed closely together in memory, increasing spatial locality of reference and reducing expensive cache misses Unless your goal is to create small code, code density is not always an indicator of code optimization. Loop Unrolling is an optimization technique that generally increases code size, but also increases code speed. This is because unrolled loops iterate fewer times than their unoptimized versions resulting in few- er index calculations, comparisons and branches taken. Note: Taken branches are expensive operations, as they take three cycles to complete and cause the pipeline to be flushed. (There is no branch prediction in the ARM920T.) Induction Variable Analysis is another speed optimization technique used in the case whe........

下载(注:源文件不在本站服务器,都将跳转到源网站下载)
备用下载
发帖评论
相关话题
发布一个新话题