delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/20/11:20:30

From: john AT polo DOT demon DOT co DOT uk (John Winters)
Newsgroups: comp.lang.c,comp.os.msdos.djgpp
Subject: Re: having trouble with long numbers
Date: 20 Aug 1997 08:25:14 +0100
Organization: Spirit software
Message-ID: <5te64q$9b5@polo.demon.co.uk>
References: <01bc9c51$0ceeec80$78ed1fcc AT darkstar> <33F1C728 DOT 2690 AT ici DOT net> <33FA5146 DOT 797547D8 AT alcyone DOT com>
NNTP-Posting-Host: localhost
Lines: 17
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019