Re: Python Fast I/o

2014-01-14 Thread Tim Chase
On 2014-01-14 05:50, Ayushi Dalmia wrote: > I need to write into a file for a project which will be evaluated > on the basis of time. What is the fastest way to write 200 Mb of > data, accumulated as a list into a file. > > Presently I am using this: > > with open('index.txt','w') as f: > f

Re: Python Fast I/o

2014-01-14 Thread Roy Smith
In article <53affb01-0c5e-46e3-9ff7-27a529db6...@googlegroups.com>, Ayushi Dalmia wrote: > Which is more fast? > Creating a 200 Mb string and then dumping into a file or dividing the 200 Mb > string into chunks and then writing those chunks. Won't writing the chunks > call more i/o operation?

Re: Python Fast I/o

2014-01-14 Thread Chris Angelico
On Wed, Jan 15, 2014 at 1:24 AM, Ayushi Dalmia wrote: > On Tuesday, January 14, 2014 7:33:08 PM UTC+5:30, Chris Angelico wrote: >> On Wed, Jan 15, 2014 at 12:50 AM, Ayushi Dalmia >> >> wrote: >> >> > I need to write into a file for a project which will be evaluated on the >> > basis of time. Wha

Re: Python Fast I/o

2014-01-14 Thread Ayushi Dalmia
On Tuesday, January 14, 2014 7:33:08 PM UTC+5:30, Chris Angelico wrote: > On Wed, Jan 15, 2014 at 12:50 AM, Ayushi Dalmia > > wrote: > > > I need to write into a file for a project which will be evaluated on the > > basis of time. What is the fastest way to write 200 Mb of data, accumulated >

Re: Python Fast I/o

2014-01-14 Thread Chris Angelico
On Wed, Jan 15, 2014 at 12:50 AM, Ayushi Dalmia wrote: > I need to write into a file for a project which will be evaluated on the > basis of time. What is the fastest way to write 200 Mb of data, accumulated > as a list into a file. > > Presently I am using this: > > with open('index.txt','w') a