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 #38135 is a reply to message #38129] Mon, 23 February 2004 01:41 Go to previous messageGo to previous message
Edd Edmondson is currently offline  Edd Edmondson
Messages: 50
Registered: January 2003
Member
David Fanning <david@dfanning.com> wrote:
> 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

Funny, that. "I'm just an average astrophysicist" too, and last week I
took my IDL program that took a *fortnight* to run and got it down to 21
seconds. That's a speed up of 55,000 times and there wasn't even a nested
loop - just one loop with a bunch of IFs in it. Through use of plenty of
WHEREs (dealing with each case previously handled with an IF) and a REFORM
plus a HISTOGRAM it's stupidly faster.

In fact it's probably more than 55,000 times because a fair few seconds of
that is needed just to read in the data file at the start.

--
Edd
[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: Sat Oct 11 15:29:08 PDT 2025

Total time taken to generate the page: 1.35651 seconds