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

Home » Public Forums » archive » Re: speed of n_elements
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: speed of n_elements [message #17650 is a reply to message #17643] Wed, 03 November 1999 00:00 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Pavel Romashkin <promashkin@cmdl.noaa.gov> writes:
>
>> * I can't repeat your experience on Sun or Linux. On both those
>> machines n_elements(data.flag) is much slower than n_elements(data),
>> at least in a loop.
>
.... program deleted ...
> IDL> a=fltarr(1000)
> IDL> b={a:a, b:a, c:a, d:a, flag:0L, name:'', other:0.0}
> IDL> c=replicate(b, 500)
> % Compiled module: TEST.
> IDL> k={a:0L, data:c}
> IDL> test,k
> 33.133333
> 0.033333302

Okay, now I agree with you. It should be clear that branch that takes
longer, a.data, has to extract a lot more data than a.data.flag. As I
said some reason IDL is very clumsy about structures with big arrays
in them (and I was talking about megabyte arrays).

> ... In my opinion, the only drawback in
> using pointers and (built-in) objects is that they take away from you some of
> the tremendous advantages that IDL has in handling arrays.

I agree. I'm not a huge fan of pointers unless I have to, especially
since I'm still trying to keep some IDL 4 compatibility.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl emacs question
Next Topic: CGM files into PC Word for Windows

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

Current Time: Fri Oct 10 17:43:21 PDT 2025

Total time taken to generate the page: 2.39832 seconds