View Single Post
  #5   Spotlight this post!  
Unread 21-01-2004, 10:43
WizardOfAz's Avatar
WizardOfAz WizardOfAz is offline
Lead Mentor
AKA: Bill Bennett
FRC #1011 (CRUSH)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Tucson, AZ
Posts: 101
WizardOfAz will become famous soon enough
Send a message via AIM to WizardOfAz
efficiency of working with integers

Quote:
Originally Posted by Larry Barello
Can you explain why not promoting to integer is more efficient? Or does that impact run time calculations even though the target may be a char?
At its heart, it's an 8 bit chip. To do arithmetic on more than 8 bits the compiler has to generate a sequence of operations, manage the carry bit, and so on. That's why working with 8 bit values is more efficient if what you're doing can fit in 8 bits.

As for declared initial values (called implicit initialization in an earlier post) - see next post.

Bill