Letting the compiler figure access patterns & choose the data structure that best fits

See one-terabyte-array-idea for arrays that could grow & shrink from both ends in O(1) time.

1 Like