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

Home » Public Forums » archive » Re: Zero... THANKS Pavel and J.D.
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: Zero... THANKS Pavel and J.D. [message #16172 is a reply to message #16168] Thu, 01 July 1999 00:00 Go to previous message
Frank Morgan is currently offline  Frank Morgan
Messages: 3
Registered: June 1999
Junior Member
Pavel and J.D.,

Thanks to both of you for some useful information.

Pavel mentioned the 0-at-the-end problem with the loop approach. After some
analysis of my problem (a directed graph search), I've discovered that most
of the vectors I search will contain a non-zero within the first 10% or so
of the length. I would have thought then that the loop would be faster
than 'where' but J.D.'s timing results prove me wrong - looks like even with
loop halt at 10% (where his test halted at 50%), the timing would be 0.99/5
= 0.2, still twice the time of 'where' searching the whole vector - boy, IDL
loops really are bad!

For now I'm settling on 'where' - it's just fast enough for the biggest
graphs I'm searching so far. J.D.'s timing for external code indicates that
with 10% lengths typical, I might get 10X speedup over 'where' but for now
the DLL compilation isn't worth it. But it gives me an out if I need to
search bigger graphs.

Incedentally, I'd never realized you can say (where())[0] to get that first
element - that's a handy statement.

Thaks,
Frank
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Iso -Surface in Object Graphics
Next Topic: Re: envi/idl question from a newbie

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

Current Time: Wed Oct 08 19:20:24 PDT 2025

Total time taken to generate the page: 0.00434 seconds