Any publications regarding PyPy / trace-based JIT compiler?
Dear PyPy team, I am in the process of writing a paper that will target some AI conference, and I would like to ask if there are any relevant publications of yours or in general that showcase the possible advantages of trace-based JIT compilation over method-based JIT compilation or static compilation. I just want to use 2 or 3 of them as references when I explain why my implementation is more scalable and robust when compared to some C/C++/Java implementations (appart from different data structures and algorithms). Thank you :) Mike
Hi Michael,
I am in the process of writing a paper that will target some AI conference, and I would like to ask if there are any relevant publications of yours or in general that showcase the possible advantages of trace-based JIT compilation over method-based JIT compilation or static compilation.
this publication has a nice listing of benefits over static compilation: http://www.hpl.hp.com/techreports/1999/HPL-1999-78.html Some of it is outdated, as I find in particular that compiled traces are very nice on contemporary speculative, out-of-order executing, branch predicting, hyper-threading CPUs in ways that made no difference on deep pipeline CPUs of old. It's a great read nonetheless. Method-based JIT compilation does not play as well with modern CPUs, as the greatest benefits are had from the inlining of functions and removal of branches. Even for C++, vtable indirection and the trampolines for calls across shared libraries are tough on modern CPUs. Inlining and finalizing calls helps, but with static profiling you only have one choice of organizing the code, on one "representative" data set. Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
Thank you Vim, I will use it. I have also found "Trace-based compilation in execution environments without interpreters" that seems kind of relevant. http://www.ics.uci.edu/~mbebenit/pubs/pppj-2010.pdf Regards, Mike On Wed, Jul 4, 2012 at 9:29 AM, <wlavrijsen@lbl.gov> wrote:
Hi Michael,
I am in the process of writing a paper that will target some AI
conference, and I would like to ask if there are any relevant publications of yours or in general that showcase the possible advantages of trace-based JIT compilation over method-based JIT compilation or static compilation.
this publication has a nice listing of benefits over static compilation:
Some of it is outdated, as I find in particular that compiled traces are very nice on contemporary speculative, out-of-order executing, branch predicting, hyper-threading CPUs in ways that made no difference on deep pipeline CPUs of old. It's a great read nonetheless.
Method-based JIT compilation does not play as well with modern CPUs, as the greatest benefits are had from the inlining of functions and removal of branches.
Even for C++, vtable indirection and the trampolines for calls across shared libraries are tough on modern CPUs. Inlining and finalizing calls helps, but with static profiling you only have one choice of organizing the code, on one "representative" data set.
Best regards, Wim -- WLavrijsen@lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
On 07/03/2012 11:28 PM, Michael Sioutis wrote:
Dear PyPy team,
I am in the process of writing a paper that will target some AI conference, and I would like to ask if there are any relevant publications of yours or in general that showcase the possible advantages of trace-based JIT compilation over method-based JIT compilation or static compilation.
I just want to use 2 or 3 of them as references when I explain why my implementation is more scalable and robust when compared to some C/C++/Java implementations (appart from different data structures and algorithms).
Thank you :)
The two PyPy papers about our tracing JIT are these: http://dl.acm.org/citation.cfm?id=1565827 http://dl.acm.org/citation.cfm?id=2069172.2069181 However, they don't really precisely answer you question, why tracing JITs are better. Cheers, Carl Friedrich
On Wed, Jul 4, 2012 at 8:44 AM, Carl Friedrich Bolz <cfbolz@gmx.de> wrote:
On 07/03/2012 11:28 PM, Michael Sioutis wrote:
Dear PyPy team,
I am in the process of writing a paper that will target some AI conference, and I would like to ask if there are any relevant publications of yours or in general that showcase the possible advantages of trace-based JIT compilation over method-based JIT compilation or static compilation.
I just want to use 2 or 3 of them as references when I explain why my implementation is more scalable and robust when compared to some C/C++/Java implementations (appart from different data structures and algorithms).
Thank you :)
The two PyPy papers about our tracing JIT are these:
http://dl.acm.org/citation.cfm?id=1565827 http://dl.acm.org/citation.cfm?id=2069172.2069181
However, they don't really precisely answer you question, why tracing JITs are better.
I don't think it is clear that tracing JITs are better. Tracing often implies some other characteristics and features, such as level of inlining, specialization and guards versus arbitrary control flow, but method JITs are not prevented from adapting these techniques. The advantages and benefits are a lot subtler than tracing versus method JITs. - David
On Wed, Jul 4, 2012 at 8:44 AM, Carl Friedrich Bolz <cfbolz@gmx.de> wrote:
However, they don't really precisely answer you question, why
On 07/04/2012 04:19 PM, David Edelsohn wrote: tracing JITs
are better.
I don't think it is clear that tracing JITs are better.
Tracing often implies some other characteristics and features, such as level of inlining, specialization and guards versus arbitrary control flow, but method JITs are not prevented from adapting these techniques.
The advantages and benefits are a lot subtler than tracing versus method JITs.
Indeed, I don't think anybody really knows the answer yet, under which circumstances which of the two methods is better. Somebody should try to do a controlled study . Cheers, Carl Friedrich
Thank you all very much! Of course I don't want to present trace-based JITs as the best choice, but leave some hints on the "possible" advantages that it "possibly" offers, just to put an additional comment on my graphs. So it has come down to this: Trace-based JIT compilation allows more specialized optimizations on code and is potentially more well suited for modern CPUs \cite{PyPy,Dynamo} ... here we also see the possible advantages of tracing JIT since ... scalable ... robust. So I think I'm not lying to anyone who reads it :) Thank you all, Mike On Wed, Jul 4, 2012 at 5:32 PM, Carl Friedrich Bolz <cfbolz@gmx.de> wrote:
On 07/04/2012 04:19 PM, David Edelsohn wrote:
On Wed, Jul 4, 2012 at 8:44 AM, Carl Friedrich Bolz <cfbolz@gmx.de> wrote:
However, they don't really precisely answer you question, why tracing JITs are better.
I don't think it is clear that tracing JITs are better.
Tracing often implies some other characteristics and features, such as level of inlining, specialization and guards versus arbitrary control flow, but method JITs are not prevented from adapting these techniques.
The advantages and benefits are a lot subtler than tracing versus method JITs.
Indeed, I don't think anybody really knows the answer yet, under which circumstances which of the two methods is better. Somebody should try to do a controlled study .
Cheers,
Carl Friedrich
______________________________**_________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/**mailman/listinfo/pypy-dev<http://mail.python.org/mailman/listinfo/pypy-dev>
On Wed, Jul 4, 2012 at 11:29 AM, Michael Sioutis <papito.dit@gmail.com> wrote:
Thank you all very much!
Of course I don't want to present trace-based JITs as the best choice, but leave some hints on the "possible" advantages that it "possibly" offers, just to put an additional comment on my graphs.
So it has come down to this: Trace-based JIT compilation allows more specialized optimizations on code and is potentially more well suited for modern CPUs \cite{PyPy,Dynamo} ... here we also see the possible advantages of tracing JIT since ... scalable ... robust.
So I think I'm not lying to anyone who reads it :)
Michael, Personally, I would not cite Dynamo to assert anything about the benefits of tracing JITs. Some of Dynamo's success was due to the quirkiness of the HP PA-RISC architecture, which also certainly would not be a good reference for modern CPUs. Also, I believe that Firefox, Chrome and Safari JavaScript JITs now are all method-based. The Meta-tracing JITs is another design feature of PyPy and provides some early optimization for dynamic languages. But as far as tracing JITs in general, the "advantage" may be more about the JIT design decisions that a tracing JIT encourages versus the default design of a method JIT. One really needs to consider a tracing JIT versus a method JIT with extensive profiling, specialization, etc. In other words, it's not a dichotomy, but a distribution. - David
On Wed, Jul 4, 2012 at 4:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
Also, I believe that Firefox, Chrome and Safari JavaScript JITs now are all method-based.
This needs to be confirmed but, I really think Firefox's TraceMonkey is a tracing JIT and Chrome's v8 is a method JIT.
On Wed, Jul 4, 2012 at 8:59 AM, Paulo Köch <paulo.koch@gmail.com> wrote:
On Wed, Jul 4, 2012 at 4:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
Also, I believe that Firefox, Chrome and Safari JavaScript JITs now are all method-based.
This needs to be confirmed but, I really think Firefox's TraceMonkey is a tracing JIT and Chrome's v8 is a method JIT. _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Tracemonkey *was* a tracing JIT, at this point it's being (if not has already been) removed in favor of IonMonkey which is a method JIT. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero
On Wed, Jul 4, 2012 at 7:06 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
On Wed, Jul 4, 2012 at 8:59 AM, Paulo Köch <paulo.koch@gmail.com> wrote:
On Wed, Jul 4, 2012 at 4:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
Also, I believe that Firefox, Chrome and Safari JavaScript JITs now are all method-based.
This needs to be confirmed but, I really think Firefox's TraceMonkey is a tracing JIT and Chrome's v8 is a method JIT. _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Tracemonkey *was* a tracing JIT, at this point it's being (if not has already been) removed in favor of IonMonkey which is a method JIT.
Yes, it's removed from SpiderMonkey: https://bugzilla.mozilla.org/show_bug.cgi?id=698201 http://blog.mozilla.org/nnethercote/2011/11/23/memshrink-progress-report-wee... --Berker
Alex
-- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
So, after discussing with a Professor of our Department with a very good knowledge on the issue, he basically was in the line of "...JIT design decisions that a tracing JIT encourages versus the default design of a method JIT...", but to be more specific on the advantages he claimed that: "tracing JITs can discover optimization opportunities in common dynamic execution paths that are not apparent to a static compiler or a method-based JIT compiler". I think this is a nice comment overall, that the PyPy publications and the features they describe can back up nicely. Thank you :) Mike On Wed, Jul 4, 2012 at 7:21 PM, Berker Peksağ <berker.peksag@gmail.com>wrote:
On Wed, Jul 4, 2012 at 7:06 PM, Alex Gaynor <alex.gaynor@gmail.com> wrote:
On Wed, Jul 4, 2012 at 8:59 AM, Paulo Köch <paulo.koch@gmail.com> wrote:
On Wed, Jul 4, 2012 at 4:49 PM, David Edelsohn <dje.gcc@gmail.com>
wrote:
Also, I believe that Firefox, Chrome and Safari JavaScript JITs now are all method-based.
This needs to be confirmed but, I really think Firefox's TraceMonkey is a tracing JIT and Chrome's v8 is a method JIT. _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Tracemonkey *was* a tracing JIT, at this point it's being (if not has already been) removed in favor of IonMonkey which is a method JIT.
Yes, it's removed from SpiderMonkey:
https://bugzilla.mozilla.org/show_bug.cgi?id=698201
http://blog.mozilla.org/nnethercote/2011/11/23/memshrink-progress-report-wee...
--Berker
Alex
-- "I disapprove of what you say, but I will defend to the death your right
to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
_______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev
Hello all! I just wanted to inform the PyPy team that my paper got accepted in ICTAI 2012 <http://ictai12.unipi.gr/>, and I presented it a few days ago. You can find the paper here<http://www.earthobservatory.eu/publications/IEEE2012.pdf>and the presentation here <http://cgi.di.uoa.gr/~sioutis/files/PyRCC8p.pdf>. It felt good to disseminate a bit Python and PyPy :) My next (long term) step is to use PyPy to parallelize some graph operations. Regards, Mike On Tue, Jul 3, 2012 at 11:28 PM, Michael Sioutis <papito.dit@gmail.com>wrote:
Dear PyPy team,
I am in the process of writing a paper that will target some AI conference, and I would like to ask if there are any relevant publications of yours or in general that showcase the possible advantages of trace-based JIT compilation over method-based JIT compilation or static compilation.
I just want to use 2 or 3 of them as references when I explain why my implementation is more scalable and robust when compared to some C/C++/Java implementations (appart from different data structures and algorithms).
Thank you :)
Mike
participants (7)
-
Alex Gaynor
-
Berker Peksağ
-
Carl Friedrich Bolz
-
David Edelsohn
-
Michael Sioutis
-
Paulo Köch
-
wlavrijsen@lbl.gov