MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

concatenating files, slowdown

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53327] concatenating files, slowdown
  • From: George Szpiro <george at netvision.net.il>
  • Date: Thu, 6 Jan 2005 02:52:02 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I have finally given up on shuffling 10^8 numbers, and decided to shuffle 
ten files of 10^7 numbers each. (ShuffledA.doc ... ShuffledJ.doc. I have Mathematica 
Version 4.2 and used Put[OutputForm[ to create the files.)

Now I am trying to concatenate the ten files

Question 1: I need quadratic time to just read the files. (See below.) WHY?

Question 2: Is there an easy way to concatenate files?


Thanks for any pointers,
George
george at netvision.net.il


Timing[
  OpenRead["c:\ShuffledA.doc"];
  aa=Read["c:\ShuffledA.doc"];
  Print["Length: ",Length[aa]];
  ]

From In[15]:= Length: 100000
Out[414]= {4.597 Second,Null}

From In[15]:= Length: 200000
Out[18]={20.68 Second,Null}

From In[15]:= Length: 400000
Out[18]= {89.679 Second,Null}

--  



  • Prev by Date: Re: LaplaceTransform TraditionalForm symbol
  • Next by Date: Re: Converting between Spherical and Cartesian coordinates
  • Previous by thread: Re: Re: Indexing a notebook library
  • Next by thread: Reap/Sow (Links now OK)