[Tutor] Load Entire File into memory

Amal Thomas amalthomas111 at gmail.com
Mon Nov 4 14:55:49 CET 2013


Hi,
@Peter:
I have checked the execution time manually as well as I found it through my
code. During execution of my code, at start, I stored my initial time(start
time) to a variable  and at the end calculated time taken to run the code =
end time - start time. There was a significance difference in time.

Thanks,

On Mon, Nov 4, 2013 at 7:11 PM, Peter Otten <__peter__ at web.de> wrote:

> Amal Thomas wrote:
>
> > Yes I have found that after loading to RAM and then reading lines by
> lines
> > saves a huge amount of time since my text files are very huge.
>
> How exactly did you find out? You should only see a speed-up if you iterate
> over the data at least twice.
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>



-- 



*AMAL THOMASFourth Year Undergraduate Student Department of Biotechnology
IIT KHARAGPUR-721302*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131104/d4126cd1/attachment.html>


More information about the Tutor mailing list