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