[Numpy-discussion] GSoC : Performance parity between numpy arrays and Python scalars
arinkverma at iitrpr.ac.in
Thu May 2 00:25:12 EDT 2013
I will pull new version, and try to include that also.
What is wrong with macros for inline function?
Yes, time for ufunc is reduced to almost half, for lookup table, I
am generating key from argument type and returning
the appropriated value.
Yes I did some profiling with oprofiler for "python -m timeit -n 1000000 -s
'import numpy as np;x = np.asarray(1.0)' 'x+x'". see data sheet.
As every time a ufunc is invoked, the code has to check every single data
type possible (bool, int, double, etc) until if finds the best match for
the data that the operation is being performed on. In scalar, we can send
best match, from pre-populated table. At present the implementation is not
well-structured and support only addition for int+int and float+float. 
On Thu, May 2, 2013 at 12:09 AM, Raul Cota <raul at virtualmaterials.com>wrote:
> It is great that you are looking into this !! We are currently running on
> a fork of numpy because we really need these performance improvements .
> I noticed that, as suggested, you took from the pull request I posted a
> while ago for the
> ( https://github.com/raulcota/numpy )
> A couple of comments on that,
> - Seems like you did not grab the latest revisions of that code that I
> posted that fixes the style of the comments and 'attempts' to fix an issue
> reported about Python 3 . I say 'attempts' because I thought it was fixed
> but I someone mentioned this was not correct.
> - There was also some feedback from Nathaniel about not liking the macros
> and siding for inline functions. I have not gotten around to it, but it
> would be nice if you jump on that boat.
> On the has lookup table, haven't looked at the implementation but the
> speed up is remarkable.
> Cheers !
> On 30/04/2013 8:26 PM, Arink Verma wrote:
> Hi all!
> I have written my application for *Performance parity between numpy
> arrays and Python scalars. *It would be a great help if you view it.
> Does it look achievable and deliverable according to the project.
>  http://projects.scipy.org/scipy/wiki/SummerofCodeIdeas
> Computer Science and Engineering
> Indian Institute of Technology Ropar
> NumPy-Discussion mailing listNumPy-Discussion at scipy.orghttp://mail.scipy.org/mailman/listinfo/numpy-discussion
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
Computer Science and Engineering
Indian Institute of Technology Ropar
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion