[Python-Dev] Python-acceleration instructions on ARM

Brett Cannon brett at python.org
Wed Feb 11 04:00:57 CET 2009


On Tue, Feb 10, 2009 at 18:45, Benjamin Schwartz
<bmschwar at fas.harvard.edu>wrote:

>
> Dear Python developers,
>
> Introduction:
> I am writing from the perspective of Sugar Labs [1], which produces Sugar,
> a
> free software project written almost entirely in Python.  Sugar is designed
> to run on small, resource-constrained computers.  So far those computers
> have been mostly x86, but it seems likely to me that we will soon want to
> run on ARM as well, with the new wave of small ARM laptops [2].  These
> laptops are likely to run on some variant of the ARM Cortex-A8 CPU core.
>
> The Cortex-A8 chips all contain a set of commands known as ThumbEE or
> Jazelle RCT (Runtime Compilation Target) [3].  According to ARM [4]:
>
> """Jazelle RCT can be used to significantly reduce the code bloat
> associated
> with AOT and JIT compilation, making AOT technology viable on mass-market
> devices. It can also be used to support execution environments beyond Java,
> such as Microsoft .NET Compact Framework, Python and others."""
>
> """Jazelle RCT provides an excellent target for any run-time compilation
> technology, including JIT and AOT for .NET MSIL, Python and Perl as well as
> Java. ARM is working with leading software providers to enable solutions
> ready for market with Jazelle RCT."""
>
> The Jazelle RCT system consists of 12 assembly instructions, documented at
> [5] and [6].
>
> Question:
> ARM is specifically claiming that these instructions can be used to
> accelerate Python interpretation.


Wow, really? One of the links below mention that?


>  Is there any interpreter code, in CPython
> or elsewhere, that uses ThumbEE mode?


Nope.


>  Is there anyone working on this?


Not that has contacted us.


>
> What would the process be to incorporate the use of ThumbEE instructions
> into CPython?
>

Well, this all depends on how you try to integrate the instructions. If you
hide it behind the macro or in a clean way that does not penalize skipping
the instructions then you write a patch. But if this can't be done it would
be better to maintain an external set of patches against trunk for this.
This might be pushed anyway as we have slowly been shying away from
platform/CPU-specific code being in the trunk, especially when it does not
come from someone who has been a Python core developer for several years.

-Brett


> The whitepaper mentions the Parrot interpreter specifically, but I cannot
> find any indication that anyone is actually working on Jazelle RCT support
> in Parrot.
>
> Thank you,
> Ben Schwartz
>
> [1] http://sugarlabs.org/go/Main_Page
> [2]
>
> http://www.engadget.com/2009/01/09/pegatron-and-freescale-team-for-low-power-ultra-cheap-netbooks/
> [3]
>
> http://en.wikipedia.org/wiki/ARM_architecture#Thumb_Execution_Environment_.28ThumbEE.29
> [4] http://www.arm.com/products/multimedia/java/jazelle_architecture.html
> [5]
> http://infocenter.arm.com/help/topic/com.arm.doc.dui0379a/CIHBCDGA.html
> [6] http://www.arm.com/pdfs/JazelleRCTWhitePaper_final1-0_.pdf
> --
> View this message in context:
> http://www.nabble.com/Python-acceleration-instructions-on-ARM-tp21947336p21947336.html
> Sent from the Python - python-dev mailing list archive at Nabble.com.
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/brett%40python.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090210/158f9b7b/attachment.htm>


More information about the Python-Dev mailing list