[Numpy-discussion] Fast threading solution thoughts

Brian Granger ellisonbg.net at gmail.com
Thu Feb 12 01:52:57 EST 2009


> I am curious: would you know what would be different in numpy's case
> compared to matlab array model concerning locks ? Matlab, up to
> recently, only spreads BLAS/LAPACK on multi-cores, but since matlab 7.3
> (or 7.4), it also uses multicore for mathematical functions (cos,
> etc...). So at least in matlab's model, it looks like it can be useful.

Good point.  Is it possible to tell what array size it switches over
to using multiple threads?  Also, do you happen to iknow how Matlab is
doing this?

> I understand that numpy's model is more flexible (I don't think strided
> arrays can overlap in matlab for example, at least not from what you can
> see from the public API).

True, but I would be happy to just have a fast C based threadpool
implentation I could use in low level Cython based loops.  When
performance *really* matters, ufuncs have a lot of other overhead that
is typically unacceptable.  But I could imagine that all that extra
logic kill the parallel scaling through Amdahl's law (the extra logic
is serial logic).

Cheers,

Brian

> cheers,
>
> David
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>



More information about the NumPy-Discussion mailing list