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 #17662 is a reply to message #17650] Wed, 03 November 1999 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Pavel Romashkin <promashkin@cmdl.noaa.gov> writes:
> So, briefly: if you want to get the size of an array of structures,
> examine the size of an array of scalar fields (if available) and you
> will have 10X5 faster n_elements.

Two things:

* 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.

* I've always found that putting large data arrays into structures is
a big loser. In my experience it's slow to create such structures
and slow to extract the fields later. Thus I was surprised by your
observation (but unfortunately I can't confirm it); however because
of that I still avoid large arrays in structures. Use pointers or
handles instead.

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 10:22:36 PDT 2025

Total time taken to generate the page: 1.27951 seconds