Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Optimizing memory

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64839] Optimizing memory
  • From: Sensei <senseiwa at mac.com>
  • Date: Sun, 5 Mar 2006 03:18:58 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi!

I wrote a parser for PDB files that calculates atom and residue  
inertia matrices, and I am sure I have written the worst code ever :)  
I'm new to Mathematica, so I don't think I know how to optimize my  
code. One particular concern is this.

Using Module[] and defining many local symbols, is the memory  
associated to them deallocated when the call exits? Or is it possible  
to force memory deallocation?

myParser[filename_]:=Module[
    { (* many symbols *) },
    symbol1 = ...;
    symbol2 = ...;
    (* very BIG memory allocation *)
    ...
]


Thanks for any information!

--
Sensei <senseiwa at mac.com>

The optimist thinks this is the best of all possible worlds.
The pessimist fears it is true.      [J. Robert Oppenheimer]



  • Prev by Date: Re: Problem with Import and/or J/Link
  • Next by Date: Re: simplifying a summation / integral
  • Previous by thread: Re: mathematica to word
  • Next by thread: Re: Optimizing memory