On Fri, May 11, 2012 at 4:54 PM, Nathaniel Smith <[email protected]> wrote:
> I
> have lying around my homedir that it would generally be a free speed
> win

Don't forget the case where the copy semantics may actually provide an
*improvement* in performance by allowing a potentially large array to
get deallocated if it was local.  People often forget that a *single
element* that is a view can 'pin' a huge array to memory by INCREF-ing
it.  If that large array trashes your cache (or worse, makes you go
into swapping), the time savings of using a view will be quickly
obliterated.

There are cases where a copy can be the fast solution...

Cheers,

f
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to