[Date Index] [Thread Index] [Author Index]
Import command 100 times slower than ReadList  ?
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: xyData=Import["xyFile.txt","Table"] 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]; Close[inFile]; 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. thanks, Chris