Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-11 Thread Martin v. Löwis
> At least IA32 and AMD64 have specific addressing modes where > it's possibile to use a multiplying factor of 1, 2, 4 or 8 for the > index register. > > I hope that compilers were smart enough to already used them. For x86, certainly (at least GCC does). For Thumb, certainly not: the compiler ca

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-11 Thread Martin v. Löwis
Antoine Pitrou wrote: > Martin v. Löwis v.loewis.de> writes: >> - efficient array indexing: they give shift-and-index back to >> Thumb mode, for a shift by 2, allowing to index arrays with >> 4-byte elements in a single instruction (rather than requiring >> a separate multipy-by-four). Again

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-11 Thread Cesare Di Mauro
Antoine Pitrou wrote: > Martin v. Löwis v.loewis.de> writes: >> - efficient array indexing: they give shift-and-index back to >> Thumb mode, for a shift by 2, allowing to index arrays with >> 4-byte elements in a single instruction (rather than requiring >> a separate multipy-by-four). Aga

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-11 Thread Antoine Pitrou
Martin v. Löwis v.loewis.de> writes: > - efficient array indexing: they give shift-and-index back to > Thumb mode, for a shift by 2, allowing to index arrays with > 4-byte elements in a single instruction (rather than requiring > a separate multipy-by-four). Again useful for JIT of array >

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-11 Thread Nick Coghlan
Cesare Di Mauro wrote: > It's not useful for CPython, since it's based on a loop which evaluates a > bytecode > at the time. > > You have to rewrite the virtual machine implementing a JIT compiler that > generates Thumb-EE instructions. But it's a big effort, since ceval.c works > in a > complet

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-11 Thread Cesare Di Mauro
On Feb, 11 2009 at 04:11:AM, Benjamin M. Schwartz wrote: > Brett Cannon wrote: >> On Tue, Feb 10, 2009 at 18:45, Benjamin Schwartz >> wrote: >> > ... >>> According to ARM [4]: >>> >>> """Jazelle RCT can be used to significantly reduce the code bloat >>> associated >>> with AOT and JIT compilatio

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-10 Thread Martin v. Löwis
> - fast instance variables: likewise, with R10 holding the this > pointer. Not applicable to Python, since there is no byte code > for instance variable access. Follow-up: this could be used to JIT LOAD_CONST efficiently, though, putting co_consts into R10. Regards, Martin __

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-10 Thread Martin v. Löwis
> ARM is specifically claiming that these instructions can be used to > accelerate Python interpretation. > > > Wow, really? One of the links below mention that? I'm skeptical though that you can really produce speedups for CPython, though; ISTM that they added Python only as a front-end

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-10 Thread Benjamin M. Schwartz
Brett Cannon wrote: > On Tue, Feb 10, 2009 at 18:45, Benjamin Schwartz > wrote: > ... >> 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

Re: [Python-Dev] Python-acceleration instructions on ARM

2009-02-10 Thread Brett Cannon
On Tue, Feb 10, 2009 at 18:45, Benjamin Schwartz 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-constrain

[Python-Dev] Python-acceleration instructions on ARM

2009-02-10 Thread Benjamin Schwartz
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 seem