<div class="gmail_quote">Hi Armin,</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">2011/9/5 Armin Rigo <span dir="ltr">&lt;<a href="mailto:arigo@tunes.org">arigo@tunes.org</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Great!  Thanks a lot.  All of test_stackless.py passes, so I&#39;m<br>
checking in the patch.  </blockquote><div><br></div><div>test_stackless.py has only pickle tests then i have tested with examples attached.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Regarding performance: it&#39;s already good to get 1/3 performance<br>
improvement.  I think it corresponds well to the removal of the extra<br>
levels: indeed, our JIT should be good at &quot;compressing&quot; this overhead<br>
(if not completely removing), so getting an extra 33% by manual<br>
rewriting sounds reasonable to me.<br></blockquote><div><br></div><div>only tested with attached factorial.py.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
About recursion_helper.py: ah, good idea to turn it into a decorator.<br>
Maybe we could include it e.g. in the stackless module.  But of course<br>
the best thing to do would be to have the effect semi-automatically,<br>
e.g. adding a way to ask the interpreter &quot;when you have consumed more<br>
than X% of the stack, automatically do the next call via a switch to<br>
this continulet&quot;...<br>
<br><br></blockquote><div>I think that should be included in stackless too. I not did this because i&#39;m not sure if the implementation is  good and the best function to decorate. In factorial.py, _channel_action is a good place but for others i&#39;m not sure. Maybe expose the helper in stackless for user choose.</div>

<div><br></div><div><br></div><div>best regards,</div><div><br></div><div>Rodrigo Araújo </div></div>