Re: vector of bin indices using histogram? [message #50766 is a reply to message #50764] |
Wed, 18 October 2006 09:27   |
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
>
|
|
|