[Numpy-discussion] Speed up function on cross product of two sets?

Zachary Pincus zpincus at stanford.edu
Mon Apr 3 08:50:10 CDT 2006

> If I were going to make a list it would look something like:
> 0. Think about your algorithm.
> 1. Vectorize your inner loop.
> 2. Eliminate temporaries
> 3. Ask for help
> 4. Recode in C.
> 5 Accept that your code will never be fast.
> Step zero should probably be repeated after every other step ;)

Thanks for this list -- it's a good one.

Since we're discussing this, could I ask about the best way to  
eliminate temporaries? If you're using ufuncs, is there some way to  
make them work in-place? Or is the lowest-hanging fruit (temporary- 
wise) typically elsewhere?


More information about the Numpy-discussion mailing list