[Numpy-discussion] in place random generation

Daniel Mahler dmahler at gmail.com
Wed Mar 14 21:59:35 EDT 2007


On 3/12/07, Travis Oliphant <oliphant at ee.byu.edu> wrote:

> I'm not convinced that the broadcasting is causing the slow-downs.
> Currently, the code has two path-ways.  One gets called when the inputs
> are scalars which is equivalent to the old code and the second gets
> called when broadcasting is desired.  Their should be only a very small
> speed hit because of the check.   So, it should be possible to do both
> without great differences in speed.
>
> Perhaps the speed hit is due to something else (like creating 0-d arrays
> from scalars, or something similar).    So, in other words, I think the
> problem is fixable, but we need someone who can track down where the
> slowness is coming from.
>
> -Travis

The problem is very easy to reproduce.
What would it take to do the tracking?
I'd like to see this fixed.
Presumably the python profiler is no use since the problem is inside C code,
which is not my expertise.

D



More information about the NumPy-Discussion mailing list