On Sun, May 27, 2012 at 12:30 PM, Makoto Kuwata <span dir="ltr"><<a href="mailto:kwa@kuwata-lab.com" target="_blank">kwa@kuwata-lab.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Ronny,<br>
<br>
Thank you for your reply.<br>
You mean that sys._getframe() will remain slow on PyPy.<br>
I'll try other way (instead of sys._getframe()) to make Tenjin faster on PyPy.<br></blockquote><div><br></div><div>Hi Makoto.</div><div><br></div><div>sys._getframe(1).f_locals will stay slow. The reason for this is that you have to create all the locals and put them in a dictionary (they normally don't even exist on the heap). Because of that we decided the JIT should simply bail out and give up trying to optimize this particular code. Note that as documented on the python website, this functionality is mostly for implementing debuggers and such (where speed does not matter), do you *really* need your callers locals? Sounds like a very deep magic to me, I can point you to this presentation [1] as to why it might be a bad idea.</div>
<div><br></div><div>[1].. <a href="http://www.youtube.com/watch?v=8e0l_Dt28MQ">http://www.youtube.com/watch?v=8e0l_Dt28MQ</a></div><div><br></div><div>Cheers,</div><div>fijal</div><div><br></div></div>