[Numpy-discussion] neighborhood iterator speed

Nadav Horesh nadavh at visionsense.com
Tue Oct 25 07:14:52 EDT 2011


Finally managed to use PyArrayNeighborhoodIter_Next2D with numpy 1.5.0 (in numpy 1.6 it doesn't get along with halffloat). Benchmark results (not the same computer and parameters I used in the previous benchmark):
1. ...Next2D (zero padding, it doesn't accept mirror padding): 10 sec
2. ...Next (zero padding): 53 sec
3. ...Next (mirror padding): 128 sec

Remarks:
 1. I did not check the validity of the results
 2. Mirror padding is preferable for my specific case.

What does it mean for the potential for the neighbourhood iterator acceleration?

Nadav.


-----Original Message-----
From: numpy-discussion-bounces at scipy.org [mailto:numpy-discussion-bounces at scipy.org] On Behalf Of Nadav Horesh
Sent: Monday, October 24, 2011 9:02 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] neighborhood iterator speed

I found the 2d iterator definition active in numpy 1.6.1. I'll test it.

  Nadav

________________________________________
From: numpy-discussion-bounces at scipy.org [numpy-discussion-bounces at scipy.org] On Behalf Of David Cournapeau [cournape at gmail.com]
Sent: 24 October 2011 16:04
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] neighborhood iterator speed

On Mon, Oct 24, 2011 at 1:23 PM, Nadav Horesh <nadavh at visionsense.com> wrote:
> * I'll try to implement the 2D iterator as far as far as my programming expertise goes. It might take few days.

I am pretty sure the code is in the history, if you are patient enough
to look for it in git history. I can't remember why I removed it
(maybe because it was not faster ?).

>
> * There is a risk in providing a buffer pointer, and for my (and probably most) use cases it is better for the iterator constructor to provide it. I was thinking about the possibility to give the iterator a shared memory pointer, to open a door for multiprocessing. Maybe it is better instead to provide a contiguous ndarray object to enable a sanity check.

One could ask for an optional buffer (if NULL -> auto-allocation). But
I would need a more detailed explanation about what you are trying to
do to warrant changing the API here.

cheers,

David
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion at scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



More information about the NumPy-Discussion mailing list