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

Home » Public Forums » archive » Re: vectorising versus loops
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: vectorising versus loops [message #38144 is a reply to message #38135] Sun, 22 February 2004 10:50 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Neil writes:

> Does anyone know what the speed increase factor is in IDL programmes
> when going from "do loops" to full vectorisation of arrays?

Would you believe a factor of 8100? Read it and weep:

http://www.dfanning.com/code_tips/slowloops.html

> I know all
> programmes are different and not every process lends itself to
> vectorisation. However, there must be some rule of thumb, ie speed
> going as a linear function of the number of array elements times some
> factor.

I think the generally accepted rule of thumb is that speed increases
exponentially with the number of JD Smith articles you have read.

> Also, are there any tricks to play if you want to vectorise loops that
> have IF statement decision in them, or any general rules for neat
> vectorisation of looped programmes?

Oh, lots and lots of articles. A google search on "FOR loops" AND
"slow" should turn up at least a week of good reading. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: creating own symbols for plot
Next Topic: Re: creating own symbols for plot

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

Current Time: Fri Oct 10 13:44:17 PDT 2025

Total time taken to generate the page: 1.03982 seconds