> However, I recognize that while random access in this > Growable Array is O(1), it does steps similar to > std::vector's at() method (which is O(1), but expected to > be slower than operator[] O(1)). I'm kind of curious how > this container compares to std::vector's random access > methods.
So according to my results, accessing an element using the growable array is a little less than twice as slow for a call to std::vector::operation[].
I should point out that in the case of a predetermined initial size for the growable array, the growable array will perform much faster (but still not as fast as the vector). The data structure was designed so that the initial buffer size can be determined at construction.
/* So according to my results, accessing an element using the growable array is a little less than twice as slow for a call to std::vector::operation[]. */
Nothing wrong with that. It's all about trade-offs. I believe that the growable array has the safety of std::vector::at, which operator[] does not.