You can always compile the C code using various levels of optimization,
then look up the instruction cycle timings for each instruction in
the Motorola MC68000 manual (available on their web site), and
add up all the cycles.

However, different Palm models have different numbers of
memory wait states, so you also add those cycles.  If the display is
in shared memory, then you'll also need to add the cycle penalty
caused by memory competition.  With armlets, you'll also need
to take into account cache hit/miss ratios and penalties.

At some point, there are so many variables that it become easier
to get the right answer by running tests on the actual hardware.

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

------
"Dan Patrutiu" <[EMAIL PROTECTED]> wrote:
I know I can do this thing, but let's say I'm interested in the technical
details too. So if one of them is faster, I would really like an explanation
in the terms of the Dragonball processor's details. So if somebody knows
this, I am very curious. Else, I will time the routines and close my eyes :)
The one that is faster, that I put :)

"Chris Antos" <[EMAIL PROTECTED]> wrote in message
news:109776@palm-dev-forum...
 I don't know the answer to your question offhand.
 But I know an easy way for you to find out the answer yourself.

 Try it each way, in a loop of 40,000 iterations or so, and time it.
 Whichever one is faster ... is faster!  :-)

 That's the surest way to obtain an answer and have high confidence in it.


 "Dan Patrutiu" <[EMAIL PROTECTED]> wrote in message
 news:109774@palm-dev-forum...
 > ...
 >
 >     Word1=GetDataWord();
 >     Word2=GetDataWord();
 >
 >     int PACK=GetDataInt();
 >     Word1=(WORD)PACK>>16;
 >     Word2=(WORD)PACK;
 >
 >     So my question put short is: which kind of data access is faster?

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

Reply via email to