Mail Archives: djgpp/1997/08/20/11:20:30
In article <33FA5146 DOT 797547D8 AT alcyone DOT com>,
Erik Max Francis <max AT alcyone DOT com> wrote:
[snip]
>
>Note that even if you're using an iteration variable that goes from 1 to
>(say) 10, you're probably better off using int. int is more likely to be
>speedier than short.
A classic example of this would be the ARM, which has 8 bit and 32 bit
manipulation instructions but no 16 bit manipulation instructions. A
typical C implementation for the ARM nonetheless has 16 bit shorts, so
the compiler has to do a lot of fancy footwork if you actually use
them. In this case they are much slower than ints.
John
--
John Winters. Wallingford, Oxon, England.
- Raw text -