Re: Very slow IDL vs Matlab (ascii file reading) [message #36896 is a reply to message #36893] |
Tue, 04 November 2003 14:56   |
R.G. Stockwell
Messages: 363 Registered: July 1999
|
Senior Member |
|
|
"Marcin Jakubowski" <ma.jakubowski@fz-juelich.de> wrote in message
news:bo93p8$1a19g3$1@ID-112500.news.uni-berlin.de...
> Hi all,
> I've tried to read an ASCII file, which is composed of one very long row
> (660*496) double precision numbers,and it takes about one second to read
the file. If I try to do similar
> in IDL 6.0
>
> =============================================
> data = FltArr(660, 496)
> OpenR, lun, 'Mydata.dat', /Get_Lun
> ReadF, lun, data
> Free_Lun, lun
> =============================================
>
> then it takes about 20 minutes (!!!) to read the same file.
I suggest directly typing in the 660 by 496 array, that might be faster than
the 20 minutes.
The above took 1.8 seconds (and that is with casting the doubles into the
float array).
Perhaps your problem is elsewhere?
cheers,
bob
|
|
|