tag:blogger.com,1999:blog-3971202189709462152.post7289127796450840053..comments2024-03-11T12:50:02.036+01:00Comments on PyPy Status Blog: JIT progressCarl Friedrich Bolz-Tereickhttp://www.blogger.com/profile/00518922641059511014noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-3971202189709462152.post-83852646655310224282009-06-24T15:50:03.906+02:002009-06-24T15:50:03.906+02:00@Ben: no. In the current incarnation, the JITs gen...@Ben: no. In the current incarnation, the JITs generated by PyPy optimize only hot loops, when they are executed more than N times. At that point, the frame object has already been allocated.<br /><br />The real advantage of virtualizables is that they allows to:<br /><br /> 1) produce very fast code, as if the frame weren't allocated at all (e.g. by storing local variables on the stack or in the registers)<br /><br /> 2) they don't compromise the compatibility with CPython; in particular, sys._getframe() & co. still works fine, because the JIT knows how and when to synchronize the virtualizable (i.e., the frame) with the values that are on the stack.<br /><br /><br />@gregturn: I don't see how you can implement something similar to virtualizables without writing a compiler, and CPython is not such a thing :-)Antonio Cunihttps://www.blogger.com/profile/17017456817083804792noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-6496392468729080682009-06-24T15:22:53.394+02:002009-06-24T15:22:53.394+02:00@Leonardo:
I'm guessing that yes, CPython COU...@Leonardo:<br /><br />I'm guessing that yes, CPython COULD have virtualizables. However, the people who built CPython a) didn't know about them, b) didn't know how to code that in "C", or c) didn't consider it a priority item.<br /><br />Either way, these are the types of advantages I would imagine coding python using python would expose. Optimize what you need to, and then start to see the real ROI of PyPy!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-90013493365674935552009-06-24T11:12:34.889+02:002009-06-24T11:12:34.889+02:00Could you use virtualizables to avoid constructing...Could you use virtualizables to avoid constructing the frame at all, and then only allocate it if it is accessed?Unknownhttps://www.blogger.com/profile/18162272536503804881noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-57899432893192528282009-06-24T01:09:36.977+02:002009-06-24T01:09:36.977+02:00Ok, I updated the post with quick explanation of w...Ok, I updated the post with quick explanation of what actually virtualizables are. Leonardo: you need compiler in the first place for that :-) Psyco has some kind of virtualizables (but psyco frames are read only).<br /><br />Cheers,<br />fijalMaciej Fijalkowskihttps://www.blogger.com/profile/11410841070239382771noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-51104143896663629322009-06-24T01:06:12.122+02:002009-06-24T01:06:12.122+02:00From what I understand virtualizables are objects ...From what I understand virtualizables are objects that you use to represent objects that are expensive to construct. For example frame objects in python are very expensive so they are virtualizables and if a function is executed and it doesn't try to access its frame object it is never created.<br /><br />Probably armin can give a more precise answer.<br /><br />What I want to know, couldn't CPython have virtualizables for frame objects? I guess the answer is that it could but would involve a lot of C code.Leonardo Santagadahttps://www.blogger.com/profile/01169581670273063873noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-30344625002378593122009-06-24T00:51:29.907+02:002009-06-24T00:51:29.907+02:00What are virtualizables?What are virtualizables?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-63135728760338706422009-06-23T23:06:22.980+02:002009-06-23T23:06:22.980+02:00I have no clue of what you're talking about, b...I have no clue of what you're talking about, bit it sounds great! Keep it up!!Luishttps://www.blogger.com/profile/01147433030878927988noreply@blogger.com