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

Home » Public Forums » archive » Re: () and execution speed
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: () and execution speed [message #44951 is a reply to message #44950] Fri, 29 July 2005 09:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
"Gert" <Gert.VandeWouwerNO @ SPAM.com> writes:

> I just played with and array of structures, each structure containing a
> (float) images.
> If i do
>
> SomeProc, psData[NumStruct].flIm[1:1000]
>
> or
>
> SomeProc, (psData[NumStruct].flIm)[1:1000]
>
> then the result is the same, but the second runs much slower. Anyone knows
> why this is so? My guess is that in the second run, a copy of the array is
> made.

Yes, the parentheses are creating a temporary copy to be
subscripted, I think.

> I would be interested to find out if there are more 'pitfalls' out there.

Oh, goodness. Then I would make a daily practice out of
consulting this newsgroup. You will be surprised what you
learn. :-)

Here are some examples:

http://www.dfanning.com/code_tips/asterisk.html
http://www.dfanning.com/code_tips/slowloops.html
http://www.dfanning.com/tips/forloops.html
http://www.dfanning.com/tips/forloops2
http://www.dfanning.com/ographics_tips/slowrendering.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Beginer question about the @ usage
Next Topic: Widget_draw coordinates?

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

Current Time: Fri Oct 10 09:33:56 PDT 2025

Total time taken to generate the page: 0.96143 seconds