From: sime AT fly DOT cc DOT fer DOT hr (S. Mikecin) Newsgroups: comp.os.msdos.djgpp Subject: Re: Int or short int ? Date: 9 Dec 1996 10:59:06 GMT Organization: FER, Croatia Lines: 24 Distribution: world Message-ID: <58grdq$p42@bagan.srce.hr> References: <58escj$m48 AT everest DOT vol DOT it> <32AB2F1C DOT 58F5A7D9 AT alcyone DOT com> Reply-To: sime AT fly DOT cc DOT etf DOT hr NNTP-Posting-Host: fly.cc.etf.hr 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 Erik Max Francis (max AT alcyone DOT com) wrote: : luca wrote: : > Hi, : > what is faster ? : > int or short int ? : In general, for any compiler, the native word size that is used by the ^^^^^^^^^^^^ : processor is going to be faster than any other combination; generally this : is called an int in a C compiler for that architecture. For DJGPP the int : is 32 bits. Not true... Here are some examples: Microsoft FORTRAN 5.x has default INTEGER as INTEGER*4 and it is a 16-bit compiler! (INTEGER*2 is faster). All compilers I have seen for the 8-bit computers have sizeof(int)==2. 1 byte chars are faster. Actually some of them for that reason have shorts of 1 byte in size. <2nd E-mail: simun DOT mikecin AT fer DOT hr >