MathGroup Archive 2000

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

Search the Archive

Import[] command 100 times slower than ReadList [] ?

  • To: mathgroup at
  • Subject: [mg23439] Import[] command 100 times slower than ReadList [] ?
  • From: "Krautschik, Chris G" <krautschikc at>
  • Date: Wed, 10 May 2000 02:32:21 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hi Mathgroup,

Manny thanks to all of you who helped me get my previous data matrix problem
solved ( Allan Hayes, Bob Hanlon, and Mark Harder).

I have been using the Import command to import various 2-D data matrices.
For a 513x122 data matrix text file I use the following command:


This task takes 117 seconds to complete (as timed by Timing[]).

When I use ReadList:

inFile = OpenRead["xyFile.txt"];
xyData = ReadList[ inFile, Number, RecordLists -> True];

This task only takes 1.26 seconds.

Why the huge performance difference?  I would prefer to use the Import
command since it is so easy to use but find it too slow for my uses.


  • Prev by Date: Re: Difficult integral
  • Next by Date: Re: matrices, dot products and convergents ofcontinued fractions
  • Previous by thread: multi-unit notebooks
  • Next by thread: Re: Import[] command 100 times slower than ReadList [] ?