Import command 100 times slower than ReadList  ?
- To: mathgroup at smc.vnet.net
- Subject: [mg23439] Import command 100 times slower than ReadList  ?
- From: "Krautschik, Chris G" <krautschikc at intel.co.jp>
- Date: Wed, 10 May 2000 02:32:21 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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