Yeah, it's probably a good idea to leave some of the optimization up to the compiler. Of course, you'll want to write your code in a way that can be optimized, and that requires reading the compiler documentation. Both gcc and VBCC have pretty good documentation about how their optimizations work.
Really though, your code should be written for readability and debugging, e.g. use
(EDIT: removed dumb example, replaced with something more relevant, added "however")
MajorArrayElementPtr->2ndArrayPointer;
However, if you're working with 2ndArrayPointer in a loop, then using a temporary variable is probably more efficient:
/* initialize array that's already allocated */
{
LONG i;
LONG * p = MajorArrayElementPtr->2ndArrayPointer;
for (i = MajorArrayElementPtr->2ndArrayNrElements; i > 0; i--)
*(++p) = 0;
}
Trev