www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/13/06:49:53

Date: Thu, 13 Aug 1998 13:48:26 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Kester Maddock <dmaddock AT xtra DOT co DOT nz>
cc: djgpp AT delorie DOT com
Subject: Re: How to make DJGPP treat an int as 16-bit in size.
In-Reply-To: <35D28E1D.A118D67E@xtra.co.nz>
Message-ID: <Pine.SUN.3.91.980813134344.4803E-100000@is>
MIME-Version: 1.0

On Thu, 13 Aug 1998, Kester Maddock wrote:

> So which is faster: shorts, from the cache, but with the 16 bit override, or
> ints (longs) with no 16 bit overide but possibly overflowing the cache?
> The array has between 322 to about 1080 elements.

This is only important if that array is accessed inside the innermost 
loop of the program.  Such programs are relatively rare.

So I still maintain that it is better to use 32-bit ints in most cases.  
Of course, if the performance sucks, you need to profile different 
optimizations.

- Raw text -


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