comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Code optimization
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Code optimization [message #75145] Wed, 16 February 2011 12:38 Go to next message
kisCA is currently offline  kisCA
Messages: 78
Registered: January 2011
Member
Hi there,

I am trying, if it's possible to write thes lines in matrix formalism
but it seems a bit tricky for me.

FOR I=1,NUM DO BEGIN
SUMI=0.
FOR K=1,M1 DO BEGIN
FOR J=1,M1 DO BEGIN
SUMI=SUMI+COV(J-1,K-1)*CS(J-1,I-1)*CS(K-1,I-1)
ENDFOR
ENDFOR
VAR_ALPHA(I-1)=SUMI*VAR_FACTOR(I-1)
ENDFOR

Is anyone got an idea it will be welcome

Cheers
Re: Code optimization [message #75169 is a reply to message #75145] Fri, 18 February 2011 10:08 Go to previous message
kisCA is currently offline  kisCA
Messages: 78
Registered: January 2011
Member
Thank you all for these enlightments !
Re: Code optimization [message #75187 is a reply to message #75145] Fri, 18 February 2011 06:46 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
Here are a couple of tongue-in-cheek ones:

- If it doesn't involve HISTOGRAM, it's too slow.
- The shorter actual code, the faster it will be (it's not true, but it correlates surprisingly well!)

-Jeremy.
Re: Code optimization [message #75196 is a reply to message #75145] Thu, 17 February 2011 13:14 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Kenneth P. Bowman writes:

> This seems sure to start a discussion. ;-)

Or, another book! ;-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Code optimization [message #75204 is a reply to message #75145] Thu, 17 February 2011 12:26 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
I second Paolo's solution as being better than mine. :-)=

-Jeremy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: working on multiple z buffers at once?
Next Topic: Ps_start and Ps_end

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:38:53 PDT 2025

Total time taken to generate the page: 0.00668 seconds