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

Home » Public Forums » archive » Re: array operations and memory consumption
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 operations and memory consumption [message #57944 is a reply to message #57943] Fri, 04 January 2008 15:16 Go to previous message
don.woodraska is currently offline  don.woodraska
Messages: 13
Registered: October 2005
Junior Member
On Jan 4, 3:19 pm, dktr....@gmail.com wrote:
> Hi all,
>
> Apologies in advance if this is old hat ... I've got a question
> regarding IDL's memory usage that can be boiled down in the following
> example:
>
> IDL> a = BINDGEN(100,100,100)
> IDL> baseMem = (MEMORY())[0]
> IDL> a = a + 1
> IDL> PRINT, (MEMORY())[3] - baseMem
> 2000049

Consider using the increment operator like this:

IDL> a++

This does an increment in-place with little additional memory (a few
bytes). The assignment c-style operators like this one below, use
double the memory.

IDL> a += 1

I haven't seen MEMORY before. Is this new in 7.0? I use help,/memory
which doesn't behave like I expect.

Good luck,
Don
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: array operations and memory consumption
Next Topic: Re: read_ascii for many rows / possible to create automatic names for variables

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

Current Time: Fri Oct 10 09:09:14 PDT 2025

Total time taken to generate the page: 0.64322 seconds