Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*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 1998

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

Search the Archive

Looking for info on making recursions eat less stack.


  • To: mathgroup@smc.vnet.net
  • Subject: [mg11150] Looking for info on making recursions eat less stack.
  • From: "Barthelet, Luc" <lucb@ea.com>
  • Date: Mon, 23 Feb 1998 21:41:09 -0500

under Win95 with 128 Mb of RAM

I have some Mathematica code that use a function recursively. at a depth
of about 500, the kernel dies. ( I raised $RecursionLimit). I am
currently assuming that it is because I eat up too much stack.

Is there any info about what to do to get a recusive function to consume
less stack?

I kept the number of local variable to a minimum. the ByteCount of the
local variables plus the parameters of the function is 2736 (which is
quite a bit).
Still I should be able to go to deeper than 500.

Also $RecursionLimit warning message does not match the actual deph, but
seems to be about 4 times deeper than my function. Does that make
sense?

thanks.




  • Prev by Date: NDSolve and DiracDelta
  • Next by Date: RE: Differential Equation evaluation
  • Prev by thread: NDSolve and DiracDelta
  • Next by thread: Re: Bug in SQRT function