On 22/01/2010 11:45, sstein...@gmail.com wrote:
On Jan 21, 2010, at 11:32 PM, Reid Kleckner wrote:
On Thu, Jan 21, 2010 at 5:07 PM, David Malcolm<dmalc...@redhat.com> wrote:
To what extent would it be possible to use (conditionally) use full
ahead-of-time compilation as well as JIT?
It would be possible to do this, but it doesn't have nearly the same
benefits as JIT compilation, as Alex mentioned. You could do a static
compilation of all code objects in a .pyc to LLVM IR and compile that
to a .so that you load at runtime, but it just eliminates the
interpreter overhead. That is significant, and I think someone should
try it, but I think there are far more wins to be had using feedback.
Wouldn't it be cool if you could run your app (say, with a torture test data
set), let the JIT do its magic, then say:
"Yes, that's what I want, now save the JIT info as it was in that run and
use it as the JIT profile every time you run the app but turn off any JIT profiling
during those runs."
Get rid of the compiler overhead (with .so trick from quoted message) ,
and the runtime overhead, but keep the JIT-ness that it already figured out was
best.
The .NET framework allows a similar process - a tool called ngen can be
run against compiled .NET bytecode, generating and caching the native
code images. When your compiled code is run the precompiled native code
is used automatically without the JIT needing to be invoked.
It is provided as a separate tool (and often invoked by application
installers) rather than allowing the native code to be distributed
because the results can be system specific.
Michael Foord
S
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog
READ CAREFULLY. By accepting and reading this email you agree, on behalf of
your employer, to release me from all obligations and waivers arising from any
and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap,
clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and
acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in perpetuity, without
prejudice to my ongoing rights and privileges. You further represent that you
have the authority to release me from any BOGUS AGREEMENTS on behalf of your
employer.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com