Quote:
Originally Posted by AustinSchuh
But, at least in C, the size of the structure is a known quantity at compile time, so I would imagine that most of the time that multiplication can be eliminated by the compiler. And then on top of that, sometimes the multiplication will be by a power of 2, so the compiler will use a cheap shift operation.
|
This does not describe a difference between array indexing in Java and pointer arithmetic in C.