[pypy-dev] bounties for pypy

Ian Ozsvald ian at ianozsvald.com
Mon Jul 4 11:40:40 CEST 2011


Re. micronumpy - all I'm doing in the Mandelbrot demo is multiplying
and addition on doubles - that'll work now, right? If so I'll make the
modification in a week or so when I next have some time.

I'm guessing that there is no 'complex' support yet, even for basic operations?

Adding micronumpy support would make for a nice addition to the v0.2 doc :-)

Ian.
re. the 6 month 'proper numpy' estimate - I'm just quoting some of the
figures that were thrown around (with wide error margins depending on
money raised, availability etc). I would *love* to see support come
through sooner!

On 3 July 2011 19:54, Maciej Fijalkowski <fijall at gmail.com> wrote:
> On Sun, Jul 3, 2011 at 8:35 PM, Ian Ozsvald <ian at ianozsvald.com> wrote:
>> Hi Maciej. I said that based on what was discussed in Armin+Antonio's
>> talk at EuroPython. If it takes 6+months for a numpy re-implementation
>> then I'm suggesting that we're into 2012. I'd be *very* happy to be
>> proved wrong!
>
> I would estimate numpy for less than 6 months (numpy, not scipy and
> not matplotlib), but well that's me. There is also a lot of outside
> contribution, so it might take less wall time than manmonth time. From
> my perspective, if we can secure *some* funding for numpy, it should
> be ready sooner than 6 months from now.
>
>>
>> Do Python 'array' objects run faster than lists in PyPy? I believe
>> that in CPython they run at the same speed (i.e. they're just a
>> convenient storage system, they don't offer any of numpy's efficient
>> math benefits).
>
> The situation between PyPy and CPython is quite different here. As of
> now, both PyPy and CPython store wrapped objects in lists (let's call
> them PyIntObject) and unwrapped (C level int) in numpy arrays. In case
> you have only interpreter, when reading a list you do:
>
> py_x = list[index]
> do_something_with_py_x
>
> when reading from numpy array (or array.array), you do:
>
> py_x = new PyIntObject(array[index])
> do_something_with_py_x
>
> so you use less memory (cache is better), but you allocate a new
> object each iteration (bad)
>
> But in case of the JIT, what happens is (list case)
>
> py_x = list[index]
> x = py_x.value
> do_something_with_x # x as in integer value not py_x
>
> array:
>
> x = list[index]
> do_something_with_x
>
> Hence, no allocation and memory saving - huge win!
>
>>
>> Does the micronumpy library support doubles yet? If so I'd be happy to
>> give it a go. If 'micronumpy' is the wrong name then tell me where I
>> should look, I'm just going on what I've remembered from the PyPy-blog
>> discussions about numpy support.
>
> yes, doubles is pretty much all it supports as of now :) micronumpy is
> a good name, but it comes under a name "numpy", so you can do "import
> numpy". Not much will work though :-)
>
> Note that we're also in the process of implementing faster vectorized
> operations, like numpyexpr, except better. The list of operations is
> very limited as of now though.
>
> Cheers,
> fijal
>
> PS. If it's unclear, I can try to explain more or pop up on IRC.
>



-- 
Ian Ozsvald (A.I. researcher, screencaster)
ian at IanOzsvald.com

http://IanOzsvald.com
http://SocialTiesApp.com/
http://MorConsulting.com/
http://blog.AICookbook.com/
http://TheScreencastingHandbook.com
http://FivePoundApp.com/
http://twitter.com/IanOzsvald


More information about the pypy-dev mailing list