comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Dynamically resizing arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Dynamically resizing arrays [message #42473 is a reply to message #42428] Wed, 09 February 2005 12:02 Go to previous messageGo to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
> Adding a row at a time requires time and memory to grow as the square
> of the size.
> Memory grows because the new chunk cannot reuse the old one, it is too
> big.
> Adding a chunk at a time reduces the coefficient by 100 or whatever.
> Doubling increases time logarithmically.
> This square growth can noticibly slow a program that does a lot of it.

Doubling reduces overall time at the expense of memory. The chunk
approach tracks memory much closer at the expense of time. While a lot
of square growth can noticeably slow a program, it will still be much
faster than the chunk approach.

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Padding numbers
Next Topic: Re: Command line arguments

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Nov 30 04:25:17 PST 2025

Total time taken to generate the page: 1.20500 seconds