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

Home » Public Forums » archive » Array Subscripting Memory Usage (watch out!)
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: Array Subscripting Memory Usage (watch out!) [message #32415 is a reply to message #32328] Thu, 03 October 2002 03:55 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Dick Jackson wrote:

> Hi all,
>
> This may be old news to some of you, but it surprised me and a couple of
> colleagues, and I couldn't find any discussion of it on this group, so
> I'll share it around.
>
> I was surprised to find how much memory is used during access to a
> subset of an array. I ran this, which makes a 1000x1000 array, and
> accesses a subset of it using an array of subscripts:
>
> a = bindgen(1000, 1000)
> subscripts = Long(RandomU(seed, 500)*1000)
> baseMem = (memory())[0]
> help, a[subscripts, *]
> highWaterMem = (memory())[3]
> Print, 'Memory used during access: ', highWaterMem-baseMem

That's normal.
If you need a constant you need memory for it in it's type multiplied by
it's length.

I would be interested how this is handled?
a = (bindgen(1000, 1000))[Long(RandomU(seed, 500)*1000),*]

regards

Reimar


--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Array comparison part 2
Next Topic: how to get time consumed by idl program?

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

Current Time: Thu Oct 09 13:25:17 PDT 2025

Total time taken to generate the page: 1.44322 seconds