Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Temporary output when assigning into slices?
Replies: 10   Last Post: Jan 27, 2013 3:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt J

Posts: 4,994
Registered: 11/28/09
Re: Temporary output when assigning into slices?
Posted: Jan 24, 2013 12:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Matt J" wrote in message <kdrm3k$ecb$1@newscl01ah.mathworks.com>...
>
> Then that's pretty fancy and new. I definitely see a difference in R2012a:
>
>
> N=1e7;
> M=1;
> B=rand(M,N);
> C=rand(N,10);
>
>
> tic;
> B*C(:,1);
> toc;
> %Elapsed time is 0.043724 seconds.
>
> z=C(:,1);
> tic
> B*z;
> toc
> %Elapsed time is 0.011419 seconds.

=====================

In fact, I just tested it with R2012b and I see the same relative performance. So, I still think SUBSREF ops always allocate memory.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.