help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slowness in function 'open'


From: Dmitri A. Sergatskov
Subject: Re: Slowness in function 'open'
Date: Thu, 21 Jun 2007 15:07:43 -0500

On 6/21/07, Mark B. <address@hidden> wrote:

Hi,

Is there a faster way to load a big text file composed only of integers? I
am having severe performance penalties by using the load function

You can try low-level i/o functions.
Assuming your big file is many lines long with 3 columns of data

fh = fopen('mybigfile");
a=fscanf(fh, "%f %f %f", [3, inf]);

will be perhaps the fastest way to read it in octave.
Also, if you read the file more than once, after the first time you can save it
into binary format (for consecutive use).

Sincerely,
Dmitri.
--


reply via email to

[Prev in Thread] Current Thread [Next in Thread]