The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Efficiently computing large numbers of vector norms
Replies: 16   Last Post: Nov 15, 2012 8:32 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,997
Registered: 11/28/09
Re: Efficiently computing large numbers of vector norms
Posted: Nov 13, 2012 11:28 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Harry Commin" wrote in message <k7rpsl$ohp$>...
> Sorry, please disregard my last post. I repeated for 1000 iterations instead of 1 and I now get:
> My original loop: 29.3665 secs
> Loop-less kron(): 25.209 secs
> Loop-less KronProd(): 20.8823 secs
> This looks like a saving of around a third, which could measure in days for me. I guess things settle down after the first iteration(?)


Yes, things settle down after the first iteration. I would have expected a lot more speed-up, though. It would be interesting to know the data dimensions you're working with.

Note also that if A1 and A2 are fixed and X2 is changing in a loop, you should compute K=KronProd({A2',A1'}) only once prior to your loop and reuse it. The same goes for kron(A1.',A2.'), although I still expect KronProd to be faster.

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.