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

Home » Public Forums » archive » Philosophy of for 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
Philosophy of for loops [message #21521] Mon, 28 August 2000 00:00 Go to previous message
tclement is currently offline  tclement
Messages: 5
Registered: August 2000
Junior Member
Hello, again, everyone!

I was just wondering what the general concensus of the "IDL Expert
Programmers" was on the use of for loops. When I first learned IDL, I
remember getting from someone or somewhere the mantra "for loops are evil"
because they take up so much time. Of course, as I learn more and watch
what goes on in this group, it seems like "for loops are sometimes evil"
would be a better mantra. The question then becomes, when do they become
evil?

In response to my thread on summing diagonal elements, Craig said that for
loops aren't always bad if you can do a lot at once, and his code proves
that you can have some fast loops.

So what defines a slow loop? Is it having a bunch of accesses to
sub-elements of arrays? Is it just having a bunch of statments? I suppose
I could do some tests of my own, and I have a little, but it's much more
fun to hear what you all have to say on the subject. I wouldn't have seen
any IDL-ku if I just kept my thoughts to myself!

Todd
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Landsat 7 and IDL Insight
Next Topic: list widget

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

Current Time: Fri Oct 10 13:15:49 PDT 2025

Total time taken to generate the page: 0.87968 seconds