csvread 3.0.1 exponentially slower than v 3.0.0

Dmitri A. Sergatskov dasergatskov at gmail.com
Thu Jul 10 12:57:40 CDT 2008


On Thu, Jul 10, 2008 at 11:28 AM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On 10-Jul-2008, David Bateman wrote:
>
> | No it should only resize if the size of the output matrix changes size
> | as there are additional columns added, at least that was the idea..
>
> It starts with rdata (and cdata) empty, then resizes anytime the
> current row or column is larger than the size of rdata (or cdata).
>
> I'd recommend starting with something like 100x100 and then only
> resizing if those bounds are exceeded, and resizing by something like
> another 100 rows or 100 columns (whichever is needed).  Then in the
> end, resizing once more to the actual max number of rows and columns
> found in the file.  That should improve performance somewhat, but
> perhaps someone can come up with a better solution.
>

Double pass (first to figure out the size of the matrix, second to do
the actual parsing and filling in the array) on the file is out of
consideration?

> jwe
>

Dmitri.
--


More information about the Bug-octave mailing list