Re: Fast linked list

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Bonj (a_at_b.com)
Date: 12/23/04


Date: Thu, 23 Dec 2004 17:36:39 -0000

If the O.P. doesn't know the maximum size it will ever get to or can't
determine it, then he could reallocate a whole new array -
"adding/deleting/inserting elements can be as slow as necessary" he said.
But it would be better to just put a finger on the maximum ever size at the
beginning. If the O.P. doesn't want to consume the maximum amount of memory
all of the time, then this is something he failed to point out.

"Mark Randall" <strike@rapiercom.freeserve.co.uk> wrote in message
news:uWfKdCI6EHA.3820@TK2MSFTNGP11.phx.gbl...
> Ever tried adding things to a static array?...
>
> - MR
>
> "Bonj" <a@b.com> wrote in message news:32ufadF3ljlf0U1@individual.net...
>> Why don't you just use an array?
>>
>> "Peter Schmitz" <PeterSchmitz@discussions.microsoft.com> wrote in message
>> news:288EB5C0-1AB1-44D8-B719-901B8BC29F6D@microsoft.com...
>>> Hi,
>>>
>>> for my current application, I need a linked list in which I can access
>>> and
>>> walk through at highest speed possible - adding/deleting/inserting
>>> elements
>>> can be as slow as necessary. Now, which template out of the C/C++
>>> standard
>>> library should I use for this - std::list? Or is there a better
>>> implementation out there?
>>>
>>> thanks
>>> Peter
>>
>>
>
>



Relevant Pages

  • Re: allocating array in function
    ... If you mean that the allocated memory can't be freed every time in a loop, ... guess your coding has some problem to forget free the array. ... > and delete and reallocate and delete ... ...
    (comp.lang.cpp)
  • Re: SQLBulkOperations question
    ... Yes I am trying to write TWO consecutive series to the same table. ... Just yesterday I discovered that if I deallocate the FIRST array, ... reallocate it with the new size, copy the second series to it AND disable ... > sure to set the corresponding row array size every time. ...
    (microsoft.public.data.odbc)
  • Re: Fast linked list
    ... then he could reallocate a whole new array - ... "adding/deleting/inserting elements can be as slow as necessary" he said. ... If the O.P. doesn't want to consume the maximum amount of memory ...
    (microsoft.public.vc.mfc)
  • Re: Fast linked list
    ... then he could reallocate a whole new array - ... "adding/deleting/inserting elements can be as slow as necessary" he said. ... If the O.P. doesn't want to consume the maximum amount of memory ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Fast linked list
    ... then he could reallocate a whole new array - ... "adding/deleting/inserting elements can be as slow as necessary" he said. ... If the O.P. doesn't want to consume the maximum amount of memory ...
    (microsoft.public.win32.programmer.kernel)