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

Home » Public Forums » archive » Re: Speeding up I/O
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: Speeding up I/O [message #38534 is a reply to message #38533] Tue, 16 March 2004 19:09 Go to previous messageGo to previous message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
Ken Knapp wrote:
> Are there any tricks to speed up I/O?
> Situation: I have 1.2 TB of data to process. The following is a typical
> read statement:
> in = {header:bytarr(128),scan:intarr(1250)}
> image = replicate(in,1250)
> openr,1,file
> readu,1,image
> close,1
> Then I process the image and output something. The slow part is in the
> readu [I used profiler to find that readu IS slowing me down, the
> computations are only a fraction of the read time].
> Any suggestions on how to speed it up?
> Tricks to make the computer find files faster?
> Would Fortran/C be faster?
>
> Any help is greatly appreciated.
> -Ken

The fastest you can get would be to read in one array instead of
an array of structures:

image = intarr( 128/2 + 1250, 1250)
openr,1,file
readu,1,image
close,1

Then you have to separate the header yourself and convert it
back to byte.

Anyway, this method is almost as fast as it gets (almost like C).
About 80% faster than the one using structures on my machine.

HDH,
marc
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ENVI: How to remove vector layer from the list of available vectors programmatically?
Next Topic: Re: dynamically change the layout of widget

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

Current Time: Sat Oct 11 08:58:49 PDT 2025

Total time taken to generate the page: 1.19459 seconds