From: "John D'Errico" <woodchips@rochester.rr.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: decrease in speed due to appending a row vecto
Message-ID: <ef580c1.9@webcrossing.raydaftYaTP>
Date: Fri, 25 May 2007 16:24:01 -0400
References: <ef580c1.2@webcrossing.raydaftYaTP> <1180055867.161190.184610@u36g2000prd.googlegroups.com> <ef580c1.5@webcrossing.raydaftYaTP> <ef580c1.7@webcrossing.raydaftYaTP> <ef580c1.8@webcrossing.raydaftYaTP>
Lines: 46
NNTP-Posting-Host: 66.66.16.32
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:411164



John D'Errico wrote:
>>
>> John, I can't reproduce your results on my computer (winxp32),
on
>> R2006b or R2007a. The cell and struct both take virtually the
> same
>> amount of time, about 20sec for the 100000 case. Growdata is
> still
>> faster, of course, coming in at about 10sec.
>>
>> Regards,
>> Eric Sampson
>> The MathWorks, Inc.
>
> The cell and the struct were both the same
> for me, but it was definitely 2 minutes.
>
> Its possible this is a CPU issue, since
> I'm running on a Mac, or a memory limitation
> issue (3/4 gig of ram.) I was running a web
> browser on the side, so there might have
> been a virtual problem.
>
> I'll re-run the test this afternoon with
> as little else competing for ram as possible
> (after I also reboot.)
>
> John
  
I reran my test. Both the struct and the
cell take 100+ seconds on my machine, not
touching the mouse during that time.

tic,for i = 1:100000,b{i} =rand(1,3);end,toc

Elapsed time is 100.453774 seconds.

I did leave a cpu monitor running, and it
showed high cpu utilization for the entire
time. There was no hard disk thrashing to
go to virtual memory.

The growdata2 call was consistently about
12 seconds.

John