The PB/DOS 3.50 user's guide describes integers as the "simplest and fastest numbers" in PB, whereas byte variables "are particularly useful for storing small unsigned integer quantities".
I know that 16-bit x86 processors are optimized for integer calculations (ie they can operate on a 16 bit value in a single operation) so calculations using byte variables certainly can't be faster than calculations involving integer variables.
Now I'd like to ask the 'expert' PB community (assuming operands and calculation results fall between 0 and 255):
Heinz Salomon
[This message has been edited by Heinz Salomon (edited January 20, 2005).]
I know that 16-bit x86 processors are optimized for integer calculations (ie they can operate on a 16 bit value in a single operation) so calculations using byte variables certainly can't be faster than calculations involving integer variables.
Now I'd like to ask the 'expert' PB community (assuming operands and calculation results fall between 0 and 255):
- *In general, should I prefer integer variables to byte variables when these variables are only used for calculations or loops (but are not saved to a file)?
*Are calculations or loops any slower when I use byte variables instead of integer variables or is there really no difference?
Heinz Salomon
[This message has been edited by Heinz Salomon (edited January 20, 2005).]
Comment