tag:blogger.com,1999:blog-3971202189709462152.post8121732841568309472..comments2024-03-11T12:50:02.036+01:00Comments on PyPy Status Blog: Tutorial Part 2: Adding a JITCarl Friedrich Bolz-Tereickhttp://www.blogger.com/profile/00518922641059511014noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-3971202189709462152.post-46314037396254999102016-07-31T00:12:27.663+02:002016-07-31T00:12:27.663+02:00BTW the link to http://bit.ly/bundles/cfbolz/1 has...BTW the link to http://bit.ly/bundles/cfbolz/1 has bit-rotted.Sarah Mounthttps://www.blogger.com/profile/05224625280152037294noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-54886996963387969972012-11-22T11:50:15.898+01:002012-11-22T11:50:15.898+01:00hi guys. can jit merge points not be put inside m...hi guys. can jit merge points not be put inside methods? Going off example3.py, if I take the body of the while loop and move it into a method of the Tape class (along with the jitdriver), all the speed gains go away. can anyone explain why this happens? Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-22743977988559944732011-08-07T09:47:45.499+02:002011-08-07T09:47:45.499+02:00Great tutorial, but where can I find the 'test...Great tutorial, but where can I find the 'test.b' file (mentioned for the tracing JIT) for a try?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-42402206000919755752011-04-13T10:50:25.488+02:002011-04-13T10:50:25.488+02:00Great article, man! Many thanks and keep on rockin...Great article, man! Many thanks and keep on rocking!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-40176024358737911612011-04-10T02:53:42.195+02:002011-04-10T02:53:42.195+02:00Well, you finally motivated me to give it a try. I...Well, you finally motivated me to give it a try. I optimized the BF example and managed to get some pretty nice speed boosts all without dipping into the low level (aside from reading the log)Winston Ewerthttps://www.blogger.com/profile/09662140751753841349noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-61945825956639778232011-04-07T11:45:42.851+02:002011-04-07T11:45:42.851+02:00The effect of the loop "[>+<-]" is...The effect of the loop "[>+<-]" is <br /><br />tape[position+1] += tape[position]<br />tape[position] = 0<br /><br />We saw that PyPy can optimize the program counter away in this loop--but this loop could be executed in constant time. Will PyPy ever be able to optimize it to that degree?Quizhttps://www.blogger.com/profile/01935712406320139010noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-54523552393193674692011-04-07T10:24:06.064+02:002011-04-07T10:24:06.064+02:00It's actually not a problem at all to have an ...It's actually not a problem at all to have an AST-based interpreter. In fact, the Prolog uses "ASTs" (Prolog is homoiconic, so the ASTs are just Prologs normal data structures).<br /><br />Maciej: that's not a problem if your ASTs are actually immutable. If they aren't you have a problem which indeed requires some engineering.Carl Friedrich Bolz-Tereickhttps://www.blogger.com/profile/00518922641059511014noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-85000507767705224162011-04-07T07:05:41.699+02:002011-04-07T07:05:41.699+02:00@Winston in theory nothing prevents JIT from worki...@Winston in theory nothing prevents JIT from working on AST-based interpreters. In practice however, it would require a bit of engineering to convince the JIT that the green (constant) argument is a complex object structure. That's however just engineeringMaciej Fijalkowskihttps://www.blogger.com/profile/11410841070239382771noreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-19024849449460127662011-04-07T06:56:11.314+02:002011-04-07T06:56:11.314+02:00In theory it should be able to, if it's writte...In theory it should be able to, if it's written in RPython. Perhaps it would be harder to place the hints for the jit engine?<br /><br />As far as I understand it, it still traces some kind of bytecode (generated from the RPython code), but uses the can_enter_jit hints to determine what to trace and the length of a trace.<br /><br />If it'll be fast is another question though. Why not give it a try? (E.g. one could implement the LLVM kaleidoscope language in RPython.)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3971202189709462152.post-60853804608594348972011-04-06T22:59:03.122+02:002011-04-06T22:59:03.122+02:00Some interpreters are written to evaluate directly...Some interpreters are written to evaluate directly from the AST. i.e. they never generate bytecode, instead each node in the ast simply has the code to execute it as a "virtual" function. Could PyPy JIT such an interpreter? Or does it essentially assume a bytecode based interpreter?Winston Ewerthttps://www.blogger.com/profile/09662140751753841349noreply@blogger.com