 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: Swap hunter
| [MUG] Re: Swap hunter |
|
Author: Maple User Group
Posted: Wed, 1 May 2002 15:19:16 -0400 (
|
>> From: Maple User Group "maple_gr"
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Tue, 30 Apr 2002 15:41:07 -0700 (PDT)
From: Robert Israel "israel"
To: "maple-list"
Subject: Swap hunter.
Without knowing more about what you're trying to do, it's hard to give
good advice, but you may be able to change your program so that it uses
less memory. If you don't need to keep all those z[i] values, why call
them z[i]? Maybe you can just use the same variable (or a few of them)
in each iteration. Or if you do need all the values, it should be
much more memory-efficient to use a Vector, particularly if you know what
type of data will go in it. E.g. if they can all be 2-byte integers
(i.e. integers from -32768 to 32767), you can make z a Vector with
datatype=integer[2], and your 3 000 000 entries will only take up 6 MB.
Robert Israel "israel"
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2
On Thu, 25 Apr 2002 "methedras" wrote:
| In a work with Maple, I had something like that:
| while abs(z[i])<2 do:
| i:=i+1;
| od:
| the problem isn't from the syntax as it works perfectly and the problem I have
| isn't a "syntax kind" of problem. The problem is that Maple starts with z[0]
| and keeps in memory every z[i] it computes !! And it should go to over 3 000
| 000 therefore it starts to swap and the process gets extremely slow. Is there
| any function/option that could avoid this behaviour.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: "Willard, Daniel Dr DUSA-OR" "daniel.willard"
To: "''"
Subject: Swap hunter.
Date: Tue, 30 Apr 2002 16:15:02 -0400
Use remember; maybe plot z over a range to see roughly where significant events occur.
|
Previous by date: [MUG] Re: Exporting Plots to files, Maple User Group
Next by date: [MUG] Hopfu.mws, C W
Previous thread: [MUG] Interpolation in Maple, Ryan Shannon
Next thread: [MUG] Hopfu.mws, C W
|
|
|