From: Tom Burgess Newsgroups: comp.os.msdos.djgpp Subject: Re: ints vs. shorts Date: Wed, 30 Apr 1997 08:33:48 -0700 Organization: BCTEL Advanced Communications Lines: 19 Message-ID: <3367665C.3FE8@bc.sympatico.ca> References: <199704300400 DOT OAA22202 AT solwarra DOT gbrmpa DOT gov DOT au> NNTP-Posting-Host: pntn02m02-108.bctel.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Leath Muller wrote: > > > I have heard that there is a performance difference between shorts > > and ints. If anyone could explain when and how much this matters, > > I would be very grateful. I'm just wondering whether to use ints > > for everything, shorts for everything, or a mix. > > Use int's - shorts have a 1 cycle stall on the pentium... > > Leathal. In addition, the V-pipe gets shut down, thus potentially costing another cycle. (an instruction that could have executed in parallel in the V-pipe is prevented from doing so). I would say use ints by default and shorts only when required by external interfaces or if the reduction in data space would help with on-chip (8K typ.) data cache utilization. regards, tom