[Numpy-discussion] Objected-oriented SIMD API for Numpy
Wed Oct 21 04:12:21 CDT 2009
A Wednesday 21 October 2009 07:44:39 Mathieu Blondel escrigué:
> About one year ago, a high-level, objected-oriented SIMD API was added
> to Mono. For example, there is a class Vector4f for vectors of 4
> floats and this class implements methods such as basic operators,
> bitwise operators, comparison operators, min, max, sqrt, shuffle
> directly using SIMD operations.
It is important to stress out that all the above operations, except probably
sqrt, are all memory-bound operations, and that implementing them for numpy
would not represent a significant improvement at all.
This is because numpy is a package that works mainly with arrays in an
element-wise way, and in this scenario, the time to transmit data to CPU
dominates, by and large, over the time to perform operations.
Among other places, you can find a detailed explication of this fact in my
presentation at latest EuroSciPy:
More information about the NumPy-Discussion