---- Original message ----
>Date: Fri, 16 Jun 2006 22:14:07 +0200 (CEST)
>From: Otto Moerbeek <[EMAIL PROTECTED]>  
>Subject: Re: slow realloc: alternate method?  
>To: Jacob Yocom-Piatt <[EMAIL PROTECTED]>
>Cc: misc@openbsd.org
>
>
>So make your increment larger and start with a larger size. Maybe you
>can estimate the initial size based on your file size. If you'll end
>up allocating a too large area, just use realloc the decrease the size
>after you're done.
>
>Also thing about other data structures: you might be better of with a
>linked list or tree here, depending on what you are doing with your
>data.

thx for all the suggestions guys. i like the idea of allocating too much space
and trimming it at the end.

the data is tick price data and once it's read into an array, it is searched for
patterns by accessing elements in sequence. linked lists were mentioned by
someone offlist.

Reply via email to