Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Suzen, Mehmet
On 14 December 2012 13:46, Simon Urbanek wrote: > You may be a bit misinformed about with tail recursion means - it still needs > to evaluate the function for each recursion step, the only difference is that > in > such special case there is no additional information that needs to be stored > -

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Suzen, Mehmet
On 13 December 2012 23:21, Rui Barradas wrote: > But it does, each recursive call will load another copy of the function, and > another copy of the variables used. > In fact, the cost can become quite large since everything is loaded in > memory again. > > Hope this helps, > Many thanks for the r

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Simon Urbanek
On Dec 14, 2012, at 6:25 AM, Suzen, Mehmet wrote: > On 14 December 2012 12:13, Suzen, Mehmet wrote: >> On 13 December 2012 23:21, Rui Barradas wrote: >>> But it does, each recursive call will load another copy of the function, and >>> another copy of the variables used. >>> In fact, the cost ca

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-14 Thread Suzen, Mehmet
On 14 December 2012 12:13, Suzen, Mehmet wrote: > On 13 December 2012 23:21, Rui Barradas wrote: >> But it does, each recursive call will load another copy of the function, and >> another copy of the variables used. >> In fact, the cost can become quite large since everything is loaded in >> memo

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-13 Thread Rui Barradas
Hello. Inline. Em 13-12-2012 21:31, Suzen, Mehmet escreveu: On 13 December 2012 17:52, Simon Urbanek wrote: Because it's far beyond what you can handle without changing a lot of other things. 500k expressions will require at least about 320Mb of stack (!) in the eval() chain alone -- compare

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-13 Thread Suzen, Mehmet
On 13 December 2012 17:52, Simon Urbanek wrote: > Because it's far beyond what you can handle without changing a lot of other > things. 500k expressions will require at least about 320Mb of stack (!) in > the eval() chain alone -- compare that to the 8Mb stack size which is default > in most OS

Re: [R] [R-sig-hpc] recursion depth limitations

2012-12-13 Thread Simon Urbanek
On Dec 13, 2012, at 10:45 AM, Suzen, Mehmet wrote: > Hello List, > > I am aware that one can set with recursion depth 'options(expressions > = #)', but it has 500K limit. Why do we have a 500K limit on this? Because it's far beyond what you can handle without changing a lot of other things. 500