
PyPy Vectorization - hencq
http://pypyvecopt.blogspot.com/2015/08/the-end-of-summer-pypy-simd.html
======
hencq
From this reddit thread [1]:

> Right now this work is on a branch and will likely be merged to the default
> branch after the PyPy 2.6.1 release which should happen any day now. So this
> work should become available in PyPy 2.7.0 or PyPy 15.xx if the release
> names change naming conventions.

What's especially cool is that any JIT generated by PyPy will be able to use
this, so if you write your own language in RPython it will be able to
automatically use SIMD as well.

[1]
[https://www.reddit.com/r/Python/comments/3ihhpf/pypy_vectori...](https://www.reddit.com/r/Python/comments/3ihhpf/pypy_vectorization_the_end_of_summer_pypy_simd/)

~~~
fijal
That's how it works ( _)

_ \- you still need to make sure in your interpreter that your traces are
optimizable by the SIMD optimizer, which is usually relatively fragile, that's
just a feature of the optimizations at hand, GCC/clang also have this problem

------
brrt
Really cool work. The upshot of it is that SIMD optimizations can work within
traced numpy calls. This is preferable to calling out to an optimized
subroutine, because the first lets you keep your registers intact (and your
trace) and the last does not.

I wonder what issues prevent them from tracing the happy-case list yet.

------
krastanov
I thought that NumPy is already supposed to use "BLAS and company" internally
and that BLAS is already as optimized as possible. What am I missing or
misunderstanding?

~~~
Veedrac
I'm not sure what the BLAS story in PyPy is, but manual looping over elements
is not going to work like that, and SIMD will help significantly there. If
you're only doing broadcasted operations, there's not much draw in PyPy over
CPython.

------
wyldfire
Keep up the good work. Looking forward to this in a future pypy release.

