Why don't you ask in the PalmOS Armlet forum?  The subject might
already have been discussed there.
  http://www.escribe.com/computing/poaf/index.html  

On Thu, 26 Jun 2003 09:51:06, Jan Slodicka writes:
>I checked it now. I picked up a random function and counted # of asm
>instructions. It is really so that the optimized code was shorter by some
>14%. I just wonder why this does not show up in the final product speed. 
>(My experience from the past says that speed optimization always brings
>measurable improvements.)

Optimization of the wrong thing can make apps slower.  If the
random function you counted did not constitute a large portion
of where your application spends its time, then the # of instructions
won't make any measurable difference.  You first need to profile
where your app spends its time.  Even if you reduce instruction
count in the right places, this won't help if the CPU is spending
most of it's time elsewhere, such as fetching data or instructions
from memory when your cache hit rate is too low, etc.  Some compiler
optimizations (loop unrolling, etc.) can actually make cache
thrashing worse.  Again, you have to profile your application,
look at where it spends its time, and what its working set and
access patterns look like compared to the size of the caches,
etc. before choosing where and how to optimize.


Ron Nicholson
HotPaw Productions
 <http://www.hotpaw.com/rhn/palm/ > 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to