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

Home » Public Forums » archive » Re: vector of bin indices using histogram?
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: vector of bin indices using histogram? [message #50766 is a reply to message #50764] Wed, 18 October 2006 09:27 Go to previous messageGo to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Yes, I expect this to depend strongly on the arcitecture
(all under LINUX or UNIX).

Compare (I had to change the sizes a bit to make the
arrays fit in real memory) these 3 different architectures:

intel pentium 4 (idl 6.2):

p=fltarr(5d7)
t=systime(1) & b=p*.5 &print,systime(1)-t
0.33394289
t=systime(1) & b=p/2. &print,systime(1)-t
0.82017112

Ratio: 2.5

intel xeon dual core (idl 6.3):

p=fltarr(1d8)

IDL> t=systime(1) & b=p*0.5 &print,systime(1)-t
0.50077415
IDL> t=systime(1) & b=p/2. &print,systime(1)-t
0.61366391
Ratio: 1.2

sun sparc (a bit older, idl 5.4):

p=fltarr(1d7)

t=systime(1) & b=p*0.5 &print,systime(1)-t
0.29103994
t=systime(1) & b=p/2. &print,systime(1)-t
0.43296313

Ratio: 1.5


Ciao,
Paolo



greg michael wrote:
> Yes, you're right - I do have those - thanks.
>
> The second trick is intriguing, but I can't reproduce it:
>
> IDL> p=randomu(0,1e8)
> IDL> t=systime(1) & b=p*.5 &print,systime(1)-t
> 0.56299996
> IDL> t=systime(1) & b=p/2. &print,systime(1)-t
> 0.54699993
> IDL> t=systime(1) & b=p*(1/2.) &print,systime(1)-t
> 0.56299996
>
> Could it be architecture-dependent?
>
> Greg
>
[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
Read Message
Read Message
Read Message
Previous Topic: Re: How to Sort/Uniq a list and keep its original index
Next Topic: Re: fast search

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

Current Time: Sat Oct 11 04:10:55 PDT 2025

Total time taken to generate the page: 1.03611 seconds