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

Home » Public Forums » archive » Re: Avoiding loop in stats
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Avoiding loop in stats [message #52147] Sun, 21 January 2007 08:01
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Sun, 21 Jan 2007, yp wrote:

> On Jan 19, 8:26 pm, FÖLDY Lajos <f...@rmki.kfki.hu> wrote:
>> Some speedup can be achieved with optimized memory access (if you have
>> enough memory for two copies of data):
>>
>> temp=transpose(data, [2,0,1])
>> for j=0l,2000l-1 do for i=0l,4000l-1 do data_st[i,j]=st_func(temp[*,i,j])
>>
>> regards,
>> lajos- Hide quoted text -- Show quoted text -
>
> Thanks Lajos,
> It does improve the speed by >35%. Quite useful :)
> btw is it necessary to copy data into temp var? I did not see any
> difference when I overwrote data with transposed data.
> --yas
>

I didn't want to destroy your original data structure. You can use data
instead of temp if you like (but transpose will still use extra memory).

regards,
lajos
Re: Avoiding loop in stats [message #52148 is a reply to message #52147] Sun, 21 January 2007 05:11 Go to previous message
yp is currently offline  yp
Messages: 42
Registered: February 2005
Member
On Jan 19, 8:26 pm, FÖLDY Lajos <f...@rmki.kfki.hu> wrote:
> Some speedup can be achieved with optimized memory access (if you have
> enough memory for two copies of data):
>
> temp=transpose(data, [2,0,1])
> for j=0l,2000l-1 do for i=0l,4000l-1 do data_st[i,j]=st_func(temp[*,i,j])
>
> regards,
> lajos- Hide quoted text -- Show quoted text -

Thanks Lajos,
It does improve the speed by >35%. Quite useful :)
btw is it necessary to copy data into temp var? I did not see any
difference when I overwrote data with transposed data.
--yas
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: MI5 Persecution: £20,000 Reward (3331)
Next Topic: nicing idl at startup from idlwave

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

Current Time: Fri Oct 10 12:06:10 PDT 2025

Total time taken to generate the page: 0.05102 seconds