[pypy-dev] numpy plans in the next 6 months?

Maciej Fijalkowski fijall at gmail.com
Sat Feb 22 16:11:53 CET 2014


On Thu, Feb 20, 2014 at 9:44 PM, Ian Ozsvald <ian at ianozsvald.com> wrote:
> Interesting answer :-) numexpr does a bit of this but your bigger
> point is that pypynumpy should go much further. That indeed will be
> interesting.
> Cheers, i.

The interesting part is that with a JIT you can do a lot more
specialization than without one, including specializing using SSE/AVX.
There has been some preliminary work that showed good improvements,
but it was never finished. Part of the problem with that is that we
have no funding for this particular kind of work (while we have
funding for correctness)

Cheers,
fijal

>
> On 20 February 2014 18:07, Armin Rigo <arigo at tunes.org> wrote:
>> Hi Ian,
>>
>> On 20 February 2014 12:59, Ian Ozsvald <ian at ianozsvald.com> wrote:
>>> Hi again. In relation to my other mail, I'm curious about the plans
>>> for numpy in the next 6 months. Is there an expectation that
>>> better-than-numpy results might be obtained (e.g. using AVX/SSE or
>>> being cache friendly)? I'll mention these as they will probably be
>>> relevant to some of the audience.
>>
>> The most relevant way to answer is probably to say that we're not
>> looking at AVX/SSE or cache friendlyness to get better-than-numpy
>> results.  These are things that can be (and, I'm sure, have been)
>> experimented with in CPython too.  The real advantage that PyPy has is
>> a JIT that can "unconventionally" be taught to produce code handling a
>> combination of matrix operations at a time.
>>
>> If you say in numpy "a + b + c", the intermediate matrix "a + b" is
>> built and forgotten.  This would not be needed if we had a way to do
>> the sum of the three input matrices in one go.  But that needs some
>> JIT somewhere, to produce the code doing this particular operation (in
>> this case, the sum of three matrices).  The point of PyPy is to
>> provide precisely such a JIT for free.
>>
>> Unless I'm missing something, the plans for numpy in the next 6 months
>> include doing this --- or rather, re-doing it.  It used to work
>> already at the beginning of numpypy, but was temporarily dropped to
>> make it easier to progress on completeness.  I can imagine that this
>> would definitely give better-than-numpy results on a large fraction of
>> programs.
>>
>>
>> A bientôt,
>>
>> Armin.
>
>
>
> --
> Ian Ozsvald (A.I. researcher)
> ian at IanOzsvald.com
>
> http://IanOzsvald.com
> http://MorConsulting.com/
> http://Annotate.IO
> http://SocialTiesApp.com/
> http://TheScreencastingHandbook.com
> http://FivePoundApp.com/
> http://twitter.com/IanOzsvald
> http://ShowMeDo.com
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev


More information about the pypy-dev mailing list