[Numpy-discussion] NEP for faster ufuncs

Francesc Alted faltet at pytables.org
Wed Dec 22 03:54:16 EST 2010


A Wednesday 22 December 2010 09:48:03 Mark Wiebe escrigué:
> On Wed, Dec 22, 2010 at 12:21 AM, Francesc Alted 
<faltet at pytables.org>wrote:
> > <snip>
> > Wow, really nice work!  It would be great if that could make into
> > NumPy
> > 
> > :-)  Regarding your comment on numexpr being faster, I'm not sure
> > :(your
> > 
> > new_iterator branch does not work for me; it gives me an error
> > like: AttributeError: 'module' object has no attribute 'newiter'),
> 
> What are you using to build it?  So far I've just modified the
> setup.py scripts, I still need to add it to numscons.

Well, just the typical "git clone ...; python setup.py install" dance.

> > i.e. numexpr is not able to achieve the 2x speedup mark that you
> > are getting with ``luf`` (using a Core2 @ 3 GHz here).
> 
> That's promising!  I based my assertion on getting a slower speedup
> than numexpr does on their front page example.

I see :-)  Well, I'd think that numexpr is not specially efficient when 
handling broadcasting, so this might be the reason your approach is 
faster.  I suppose that with operands with the same shape, things might 
look different.

-- 
Francesc Alted



More information about the NumPy-Discussion mailing list