Hi
We want to use a C++ vector in our application, but the Dinkumware vector class provided by CGT 6.1.10 is too slow for us (a push_back() call takes ~50ns on a 6488 clocked at 1GHz).
The issue is that the vector class supports dynamic reallocation such that the vector may grow beyond its present capacity if necessary. So push_back() must always check that there is sufficient storage for the new element, and allocate more memory if necessary.
In our app, our vector will never grow beyond its initial capacity. Therefore, the complexity (and resulting speed penalty) of the Dinkumware class is not required.
Does anyone know of a C++ vector class that provides an unchecked push_back() method, or that does not support dynamic reallocation please?
Best regards
David