![]() |
| CodeBalance® Code Optimizer | |
| CodeBalance | |
The CodeBalance® Code Optimizer enables embedded developers to achieve an optimum balance of small code size and high performance. In ARM/Thumb® and MIPS16® architectures, both 16-bit and 32-bit instructions are supported, giving the developer a choice. In general, 16-bit instructions will yield smaller total code size for a given function, compared with 32-bit instructions. However, in general, 16-bit instructions will not perform the function as fast as 32-bit instructions would. This presents a dilemma to the developer: Should I optimize for "Smaller" or "Faster"? needs. |
|
| Optimize for Samller Faster Code | |
| With CodeBalance, Green Hills Software offers an automated method of making this trade-off easily and effectively, based on the developer's priorities. Here's what CodeBalance can do:
Here's how CodeBalance works: First, CodeBalance compiles the whole application in 32-bit mode. This is intended to produce the highest possible performance without regard for code size. Then, CodeBalance profiles the application, finding out how long each function executes as a percentage of overall execution time. Next, CodeBalance recompiles those functions that take up the smallest amount of execution time into 16-bit mode, reducing their code size. CodeBalance continues recompiling individual functions until it reaches the user-specified limit of code size reduction ("X") or execution-time guarantee ("Y"). Finally, CodeBalance reprofiles the application and shows the user the results. For example, "By reducing code 37%, execution time increased by 4%". CodeBalance performs these steps automatically, even with hundreds of functions in the application. This provides the developer with a powerful, easy to use tool for creating a program to meet the needs of the application. UNIQUE CAPABILITIES CodeBalance can optimize code because of two unique capabilities:
|
|
|
|