[Numpy-discussion] Faster fill

Sasha ndarray at mac.com
Mon Feb 27 21:11:06 EST 2006


On 2/27/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> Sasha wrote:
>
> >I''ve just posted a patch at
> >http://projects.scipy.org/scipy/numpy/wiki/PossibleOptimizationAreas
> ...
> This looks like a good proceedure.

On the second thought, it may be better to commit experimental changes
to a branch in svn and merge to the trunk after review.  What do you
think?

> I would probably also not define the misaligned case, but just use the
> default code for that case as well.  This is consistent with the idea
> that misaligned data will have slower operations.
>
It turns out my approach does not speed up misaligned case.  I've
posted a new patch that incorporates your suggestions at
<http://projects.scipy.org/scipy/numpy/wiki/PossibleOptimizationAreas/FillDiscussion>.
(Note the change in location.)

>
> You also need to add a check so that if the function pointer is NULL,
> the optimized function is not called.
>
Done in the new patch.

The patch passes numpy.test(10), but I don't think it tests
ndarray.fill in any meaningful way.  I will probably need to add some
tests.




More information about the NumPy-Discussion mailing list