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

Home » Public Forums » archive » Re: Strange memory problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Strange memory problem [message #18329] Wed, 22 December 1999 00:00
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
"Mark D. Williams" wrote:
> FWIW, if you want to save time and memory, a faster way to do the above
> is as follows:
>
> WAVE> temp = BYTARR(1000,1000,25, /NoZero) + 10B

I get the fastest response (in IDL) with

temp = replicate(10B, 1000, 1000, 25)

Cheers,
Liam.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
Re: Strange memory problem [message #18333 is a reply to message #18329] Wed, 22 December 1999 00:00 Go to previous message
wbiagiot is currently offline  wbiagiot
Messages: 59
Registered: January 1999
Member
In article <38602B16.5EDA39B@resource-eng.com>,
"Mark D. Williams" <markw-xxxnospamxxx@resource-eng.com> wrote:

>
> FWIW, if you want to save time and memory, a faster way to do the
above
> is as follows:
>
> WAVE> temp = BYTARR(1000,1000,25, /NoZero) + 10B
>


Mark,

FWIW, I don't often comment on programming examples posted here even
though I usually try them out. I was floored by the benchmark
comparisons that I got when checking out your idea. I have a Win95
Pentium 200 32Mb machine w/ IDL 5.2.1. I didn't run an exact time count
but I estimate your idea being ~30 times faster (~4 seconds vs. over a
minute). Also, and perhaps more importantly, IDL consumed only 25-26
Mbytes operating on your code and 125-126 Mbytes on the original
(obviously churning like crazy)!!!

I regularly work with large arrays and need to go back into my
application to see if I can utilize this.

Thanks for an eye-opener!

Bill B.


--
"They don't think it be like it is, but it do."

Oscar Gamble, NY Yankees


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: Strange memory problem [message #18335 is a reply to message #18329] Tue, 21 December 1999 00:00 Go to previous message
Mark D. Williams is currently offline  Mark D. Williams
Messages: 15
Registered: November 1999
Junior Member
"R. Kyle Justice" wrote:
>
> When I do the following:
>
> temp=bytarr(1000,1000,25)
> temp(*)=10
>
> my computer (a Sparc20 with 128MB of *available* ram) grinds
> to a halt. Actually it starts using swap. Don't tell me
> PV-Wave is making 5 or 6 copies of the array just to do this
> simple process!
>
> Has anyone else seen this curious behavior on PV-Wave? IDL? I have
> verified it on a PC, and using different versions of PV-Wave(6.1,7.0).
>
> I have played around with the z-value and 25 (i.e. 25MB) is roughly
> the cutoff for going into swap for a 128MB system.
>
> Kyle

I don't have access to a Sparc, but I tried this on PV-WAVE 7.0 on
both Windows NT 4.0 and RedHat Linux 6.0 on a system with 256 Mb of
physical RAM and didn't experience any problem: i.e., no swapping,
returned to the prompt within 3-4 seconds.

FWIW, if you want to save time and memory, a faster way to do the above
is as follows:

WAVE> temp = BYTARR(1000,1000,25, /NoZero) + 10B

Note, was it your intent to end up with temp being an INTARR? By
assigning
10 instead of 10B, that is what you're ending up with.

Regards,
Mark Williams
Resource Engineering, Inc.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: idl 5.3 runtime on idl 5.2 system work?
Next Topic: fortran .dll using ms powerstation

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

Current Time: Thu Oct 09 23:51:19 PDT 2025

Total time taken to generate the page: 1.43873 seconds