Integers was:RE: [AccessD] Global Variable

Stuart McLachlan stuart at lexacorp.com.pg
Wed May 18 18:03:16 CDT 2005


On 18 May 2005 at 10:48, Francisco Tapia wrote:

> I was always under the impression that a 16bit integer was processed in a 
> single clock cycle just like the 32bit long integer. Additionally a 16bit 
> integer always took up less memory. Have I been led astray from all the 
> various tech magazines and discussion lists around the net?
> 

The arithmetic is processed in the same number of cycles. It's accessing 
the data in memory and returning the result that takes up takes the 
additional steps and adds extra cycles if the variable is not "native" in 
size (ie 32 bit on a 32 bit processor).

Secondly,  generally a compiler can't optimize loops, array indices etc by 
storing the variable as a "register variable" unless it is a "native int".



  



-- 
Stuart





More information about the AccessD mailing list