[Numpy-discussion] numarray and SMP

Christopher T King squirrel at WPI.EDU
Fri Jul 2 06:37:20 CDT 2004


On Thu, 1 Jul 2004, Perry Greenfield wrote:

> 1) I suppose you did this for generated ufunc code? (ideally one
> would put this in the codegenerator stuff but for the purposes
> of testing it would be fine). I guess we would like to see
> how you actually changed the code fragment (you can email
> me or Todd Miller directly if you wish)

Yep, I didn't know it was automatically generated :P

> 2) How much improvement you would see depends on many details.
> But if you were doing this for 10 million element arrays, I'm
> surprised you saw such a small improvement (30% for 4 processors
> isn't worth the trouble it would seem). So seeing the actual
> test code would be helpful. If the array operation you are doing
> for numarray aren't simple (that's a specialized use of the word;
> by that I mean if the arrays are not the same type, aren't
> contiguous, aren't aligned, or aren't of proper byte-order)
> then there are a number of other issues that may slow it down
> quite a bit (and there are ways of improving these for
> parallel processing).

I've been careful not to use anything to cause discontiguities in the 
arrays, and to keep them all the same type (Float64 in this case). See my 
next post for the code I'm using.






More information about the Numpy-discussion mailing list