For example, in the following code:
int myarray[3];
int x = myarray[1];
Is the code guaranteed to execute successfully in constant time, with x
having some integral value? Or can the compiler skip emitting code for this entirely / emit code to launch GNU Chess and still comply with the C++ standard?
This is useful in a data structure that's like an array, but can be initialized in constant time. (Sorry, don't have my copy of Aho, Hopcroft and Ullman handy so can't look up the name.)