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

Home » Public Forums » archive » Re: Concatenating arrays - speed issues?
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: Concatenating arrays - speed issues? [message #76472 is a reply to message #76471] Wed, 08 June 2011 02:48 Go to previous messageGo to previous message
rjp23 is currently offline  rjp23
Messages: 97
Registered: June 2010
Member
On Jun 7, 5:42 pm, Craig Markwardt <craig.markwa...@gmail.com> wrote:
> What you are doing is the "IDL way" in the sense that it's a natural
> use of the concatenation feature of the language.
>
> But as you noticed, the performance degrades for lots of append
> operations.
>
> The next best way is to grow the array in chunks, and then fill in the
> chunks with available data.  This forces you to keep track of the
> number of used elements in the array, separate from the array size.
> Once you fill the available chunk, only then do you add another
> chunk.
>
> This doesn't really get rid of the problem you noticed, but it does
> reduce the problem significantly.  So, if each chunk has 1000
> elements, then the performance degradation is 1000x less.  Then you
> can start to get fancy by growing the array with variable sized
> chunks.
>
> Craig


That might actually be quite a nice solution, it just means keeping
track with a few more counters.

I'll have a play and see how it goes :-)

Cheers
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: openr or openw with COMPRESS flag broken for large data files
Next Topic: labeling is not visible in postscript output

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

Current Time: Sat Oct 11 09:40:39 PDT 2025

Total time taken to generate the page: 0.87924 seconds