In Pentium CPU's all 8-, 16- or 32-bit operations are performed in one CPU cycle, so there is no performance penalty. What you might be thinking of are MOV operations involving non-aligned 16- and 32-bit data. In this case, the performance penalty is one CPU read or write cycle - which can vary in time depending on whether the data is cached or not.
----- Original Message ----- From: "Ross Levis" <[EMAIL PROTECTED]> To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]> Sent: Wednesday, September 15, 2004 11:15 AM Subject: Re: [DUG] ShortInt, SmallInt > Ok, what about a Char type. Would this also need to be moved around in the > CPU. It's basically single byte ordinal type, so I presume this would be > slow as well, and get slower as we get more higher bit processing CPU's. > 64-bit will be common soon so ideally the minimum variable size should be 8 > bytes. That's 8 times memory wastage. But as you say, it's probably not > worth the worry unless there are several thousand Byte variables required. > > Cheers, > Ross. > > ----- Original Message ----- > From: "Neven MacEwan" <[EMAIL PROTECTED]> > To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]> > Sent: Wednesday, September 15, 2004 8:10 AM > Subject: Re: [DUG] ShortInt, SmallInt > > > > Ross > > > > Its inefficient to use a byte in a 32 bit processor as it > > may have to shift it about to evaluate it. Its really academic in these > > days of megabyte memory to be concerned with 1 vs 4 bytes > > _______________________________________________ > Delphi mailing list > [EMAIL PROTECTED] > http://ns3.123.co.nz/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
