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

Home » Public Forums » archive » Re: JBIU utilities - release 1.0
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: JBIU utilities - release 1.0 [message #60796 is a reply to message #60794] Fri, 13 June 2008 13:07 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Jun 13, 12:44 pm, Brian Larsen <balar...@gmail.com> wrote:
> Oddly I opened up sign() and in the spirit of Coyote's IDL way I have
> previously written sign() without the nasty for loop. This rewrite
> gained a x12.6 improvement in speed for my test case.
>
> function sign, in
> pos = make_array(n_elements(in), /byte, value = 1)
> zero = in EQ 0
> neg = in LT 0
> pos = pos - zero
> pos = pos - 2 * neg
> return, pos
> END

Yup, that would definitely be better! You can probably age date when I
originally wrote each of those routines by the decreasing number of
FOR loops with time. ;-)

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Warping with intensity conservation or drizzle algorithm
Next Topic: JBIU utilities - release 1.0

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

Current Time: Thu Oct 09 22:39:12 PDT 2025

Total time taken to generate the page: 0.32071 seconds