CodeSpriteEmbedded software consultancy
specializing in
ARM Powered systems
HomeSite MapClientsContact
Search this site 
powered by FreeFind

Software Efficiency Reviews

Optimization Options

When requesting code optimization, the first decision is whether speed or code/data size optimization is the prime requirement. Very often the answer is "both!". That's not necessarily a problem - most optimizations implemented by CodeSprite have yielded improvements in both size and speed - particularly when aggregate savings across a number of functions in a large source code file are considered.

For certain classes of functions, such as digital signal processing filters, ultimate speed requires loop unrolling - and that will lead to significant code size penalties.

A very important consideration when optimizing code is to understand the true dynamic range for data values. This is something that CodeSprite can work with your engineers to determine. Frequently we have been able to say something like "This variable will never overflow a 32-bit value if your input never exceeds 23456" - and then we can work with the client engineer to determine if this restriction is met, or if we can dynamically scale the inputs without losing significant accuracy.

Regarding accuracy of optimized function outputs - one important decision is whether the optimized function must be bit-exact, or whether some variance is permitted in the output. This is an important consideration, since small variances within specified tolerances can often allow approximations that can lead to orders of magnitude performance enhancements.