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 #74300 is a reply to message #74299] Thu, 06 January 2011 13:57 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Jan 6, 7:53 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
>> I have to read a large ascii file (2.5e+07 lines) into a 5000x5000 intarr. The code below works fine but it takes roughly 15-20min on my machine( not the oldest :) ). Any suggestions how to accelerate this?
>
>> CODE:
>
>> OPENR, unit, file, /GET_LUN
>
>> result = INTARR(5000,5000, /NOZERO)
>> count=0d

Also, it would be better to count with integers. With a long
(initialized 0L) you can count up to 2^31-1, with ulong (0UL) up to
2^32-1, exactly (without the loss of precision that would eventually
happen with doubles). Those are long enough that the time to count to
that will be an issue before the count overflows, but there are also
the much larger long64 and unsigned long64.
[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: Fri Oct 10 02:58:16 PDT 2025

Total time taken to generate the page: 0.05069 seconds