@Charles R Harris

>> For example 'sqrt(a**2 + b**2)' can be performed...
> I think this particular function is already available as a ufunc.

I am not sure it is implemented as ufunc.
But in any case it was just an example.

Another example is 
sin(2*pi*w+phi)
that is currently implemented allocating a temporary vector for
(2*pi*w), another temporary vector for (2*pi*w+phi) and another
for sin(2*pi*w+phi).
With my patch only the first temporary vector is allocated,
then it is reused twice and finally returned.
One allocation instead of three.

All this happens under the hood and is completely transparent to the user.

Best,
Luca


P.S. I am sorry I am messing up with the threads but I had the digest enabled 
and I did not know how to reply to a post
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to