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

Home » Public Forums » archive » How to speed up KRIG2D by 30x
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: How to speed up KRIG2D by 30x [message #86143 is a reply to message #86142] Thu, 10 October 2013 13:04 Go to previous messageGo to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Thursday, October 10, 2013 12:27:51 PM UTC-6, David Fanning wrote:
> Chris Torrence writes:
>
>
>
>> Anyway, let me know how this code looks. If all goes well, this will make it into IDL 8.3, due out in a month or so.
>
>
>
> Substituting this:
>
>
>
> j = Lindgen((n-1) - i) + i
>
>
>
> For this (which doesn't compile):
>
>
>
> j=[i:n-1]
>
>
>
> I find that the new version runs about 80 times faster than the old
>
> versioin. But, I also find that the results are different:
>
>
>
> IDL> minmax, z1 ; Old version
>
> MinMax: -0.139365 4.87036
>
> IDL> minmax, z2 ; New version
>
> MinMax: 0.954356 5.97115
>
>
>
> Any ideas on how to account for this? Displaying the two arrays as
>
> images side-by-side shows the differences.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Hi David,
Thanks for trying out the code. Whoops! That [i:n-1] is a new IDL 8.3 feature. :-)

But I think your replacement code should be:
j = LINDGEN(n-i) + i

That probably explains the difference. When I compare the old to the new, I see differences of 10^-5 or less.

-Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL Astro Library Furloughed
Next Topic: scopes

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

Current Time: Thu Oct 09 23:57:33 PDT 2025

Total time taken to generate the page: 1.20217 seconds