coldfusion244 Posted March 2, 2005 Posted March 2, 2005 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. Quote -Sean
HJB417 Posted March 2, 2005 Posted March 2, 2005 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. Quote
coldfusion244 Posted March 3, 2005 Author Posted March 3, 2005 I would use the stl list. the vector is the equivalent of the .net arraylist. w/ the arraylist' date=' everytime you add more data than it can hold, it will need to create a larger array and copy the data.[/quote'] 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? Quote -Sean
HJB417 Posted March 3, 2005 Posted March 3, 2005 (edited) well, the stl list is a linked list. Edited March 3, 2005 by HJB417 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.