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 #50768 is a reply to message #50766] Wed, 18 October 2006 09:25 Go to previous messageGo to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Wed, 18 Oct 2006, David Fanning wrote:

> =?ISO-8859-2?Q?F=D6LDY_Lajos?= writes:
>
>> oops, I have to correct myself: FDIV latency is 23 clock cycles for float,
>> 38 for double, and 43 for long double. Anyway, it is greater than 7.
>
> Well, the multiplication is actually a bit faster on
> my machine (Windows) than the division. So I'm not
> at all sure how generalized this result is.
>
> Cheers,
> David

A little experiment with a surprising result, on a Pentium D 3.4 GHz with
linux and IDL 6.2. The array size is small to avoid memory access latency.

regards,
lajos


; md.pro <- cut here
a=sin(findgen(1000))*1e38
nrep=1000000l

t=systime(1)
for j=1l,nrep do b=a/2.
print, 'DIV: ', systime(1)-t

t=systime(1)
for j=1l,nrep do b=a*0.5
print, 'MUL: ', systime(1)-t

end
; md.pro <- cut here


IDL> .ru md
% Compiled module: $MAIN$.
DIV: 13.824564
MUL: 2.1084599
IDL> .ru md
% Compiled module: $MAIN$.
DIV: 13.793007
MUL: 2.0625601
IDL> .ru md
% Compiled module: $MAIN$.
DIV: 13.829693
MUL: 2.1155751
IDL>
[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: Fri Oct 10 07:06:21 PDT 2025

Total time taken to generate the page: 1.36321 seconds