Chris, thank you! 

That looks like the explanation, which cheers me up immensely, since it 
should be easy to work round.
I looked at the same memoize code and it never occured to me that that was 
what was going on. I just thought Clojure hated me.

A combination of fixing memoize and increasing the stack size should give 
me as much recursion as a man could reasonably need.

John.

On Monday, September 23, 2013 2:13:12 PM UTC+1, Chris Perkins wrote:
>
> On Sunday, September 22, 2013 5:28:37 PM UTC-6, John Lawrence Aspden wrote:
>>
>> This recursion limit really is quite nasty. I could probably live with 
>> 4000, but 200? And why would memoization make it worse anyway?
>>
>>
>> The factor of 20-or-so smaller recursion limit comes not from memoize 
> directly, but from apply, which appears to use a relatively enormous amount 
> of stack space.
>
> I suspect that since AFn.applyToHelper dispatches on up to 20 arguments, 
> that stack space for all 20 is always used, even if you only pass, say, one 
> argument.
>
> - Chris Perkins
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to