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

Home » Public Forums » archive » Re: Read large ascii file quickly
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: Read large ascii file quickly [message #74291 is a reply to message #74290] Fri, 07 January 2011 02:29 Go to previous messageGo to previous message
MC is currently offline  MC
Messages: 50
Registered: September 1996
Member
On Jan 7, 11:54 am, Paul Magdon <paulmag...@yahoo.de> wrote:
> Dear all,
> I print the counter just to make sure something is working.
>
> Here are a couple of lines of the ascii:
>
> 0.050249,0.058117,0.029660,0.097091,0.358593,1
> 0.051483,0.061990,0.030229,0.095512,0.371539,1
> 0.055431,0.062700,0.031565,0.090342,0.382935,1
>
>
>
>> Well noted. I imagine nobody is going to read the 25 million numbers
>> printed on the screen. The most efficient way to read the file will
>> probably not use a loop anyway.
>
> Yes, I would love to see another option without a loop but I don't know any
> Cheers Paul

Printing the counter may be the slowest step Comment that out. Also, I
think you can read the data in one go into a single big array -so no
loop needed as EOF stops the read with an error message -you can then
catch the EOF error generated. Sort of an ugly way of doing it but it
might be faster than looping

Cheers MC
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: reading portions of a large binary file
Next Topic: Re: Fitting an ellipsoid with MPFITEXPR

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

Current Time: Sat Oct 11 00:03:46 PDT 2025

Total time taken to generate the page: 0.40110 seconds