Path: news.mathworks.com!not-for-mail
From: "ggk " <ggkmath@comcast.net>
Newsgroups: comp.soft-sys.matlab
Subject: how to save time loading data from file
Date: Sun, 3 Aug 2008 22:10:03 +0000 (UTC)
Organization: Jittertime Consulting
Lines: 26
Message-ID: <g75abr$40d$1@fred.mathworks.com>
Reply-To: "ggk " <ggkmath@comcast.net>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217801403 4109 172.30.248.37 (3 Aug 2008 22:10:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 3 Aug 2008 22:10:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1391296
Xref: news.mathworks.com comp.soft-sys.matlab:483396



Hi, 

I've run a profile on my code and found that 90% of the 
time running my .m file is consumed by one line of code:

x = load('data.txt');

I'm using 1GB RAM (Windows XP 3GHz Pentium4). The file 
contains ascii data -- one data point (double precision) 
per row, and many rows.

Can anyone share their insight how to speed this up?

- Will more RAM help?
- Any other means to load data into matlab that is faster?

If I were to buy a new machine just for speeding this up, 
what characteristic(s) should I look for to buy? In other 
words, what's limiting the speed here and how to make sure 
I get a machine that can speed this up? 

Seems like I just need to get the data from the hard drive 
into RAM. Would a SAS drive be better than SATA, for 
example? Faster DDR memory? etc.  

Appreciate any insight here. Best regards, -GGK