array help

coldfusion244

Junior Contributor
Joined
Nov 24, 2004
Messages
266
Location
Philadelphia
I have an object of type A. It encapsulates a small amount of actual data, the rest are functions that manipulate the data. My question is, would it be faster to use a linked list array or use the STL library's vector? This will be a dynamic array and has the possibility to chage from 100 items to 0 in 200 milliseconds. Any thoughts or ideas are appreciated.
 
I would use the stl list. the vector is the equivalent of the .net arraylist. w/ the arraylist, everytime you add more data than it can hold, it will need to create a larger array and copy the data.
 
HJB417 said:
I would use the stl list. the vector is the equivalent of the .net arraylist. w/ the arraylist, everytime you add more data than it can hold, it will need to create a larger array and copy the data.

That sounds innefficient, is there a way of manipulating memory so that I could create and array and then when I needed more space, link it to another point?
 
Back
Top