Speed of writing in Mathematica 3.01
- To: mathgroup@smc.vnet.net
- Subject: [mg11752] Speed of writing in Mathematica 3.01
- From: bridges@en.com (James Bridges)
- Date: Thu, 26 Mar 1998 03:09:20 -0500
- Organization: `
Am I doing something wrong or is it supposed to take orders of magnitude
longer than is reasonable to write out a simple ASCII file from
Mathematica? Consider this simple test:
In[7]:=
a=Table [i,{i,1,1001}];
In[8]:=
Timing[
filename="Macintosh HD:test.ascii";
output=OpenWrite[filename];
Do[
Write[output,a[[i]]];
,{i,1,1001}];
Close[output];
]
Out[8]=
{23.4 Second,Null}
23 seconds to write 1001 integers?! On a 233MHz G3! Everything else is
whiff-bam fast, but writing is glacial. Now this is a simplified
example of what I need to do but it contains one of the factors, namely
that I have to individually write out elements of a list, hence the Do
loop. Any hints?
James Bridges
--
James Bridges
Cleveland, OH
- Follow-Ups:
- Re: Speed of writing in Mathematica 3.01
- From: Sean Ross <seanross@worldnet.att.net>
- Re: Speed of writing in Mathematica 3.01