Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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.
-Sean
Posted
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.
Posted
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?

-Sean

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...