PDA

View Full Version : BYTE versus WORD and time



RussMartin
- 4th February 2010, 22:22
If I use BYTE variables in this expression rather than WORDs . . .

A = A + B

. . . how much faster is the execution? May I assume that if A and B are BYTEs, it will be about twice as fast than if they are WORDs? Or does the manipulation for WORDs add even more overhead?

I did search but did not identify a thread that addressed this. If there is one, please send me there.

Thanks.

Darrel Taylor
- 5th February 2010, 02:21
There's this ...

instruction execution time
http://www.picbasic.co.uk/forum/showthread.php?t=365

and this ...

Code Timer - How long does it take to execute XYZ command?
http://www.picbasic.co.uk/forum/showthread.php?t=9350

hth,

RussMartin
- 5th February 2010, 03:20
Thanks, Darrel.

It looks, though, like a simpler approach in my situation might be to just toggle a pin and look at the oscilloscope. I don't need to know down to a gnat's whisker, just wanted a general idea.