CreateVector
CreateVector(s)
Stack | Position | Description |
---|---|---|
Stack(In) | Top | - |
Stack(Out) | Top | a vector |
creates an empty vector (pre-allocated for n elements)
CreateVector(STACK)
Stack | Position | Description |
---|---|---|
Stack(In) | Top | n |
Stack(Out) | Top | a vector |
creates an empty vector (pre-allocated for n elements)
The empty vector can then be filled with insert elements without having to reallocate it internally.
Note: The reallocation of a vector on modern machines is basically a very fast operation and can only be measured in the range of many millions of elements. Preallocation is therefore an unnecessary micro-optimisation for smaller vectors.