[Numpy-discussion] slow import of numpy modules

David Cournapeau cournapeau@cslab.kecl.ntt.co...
Wed Jul 2 21:38:09 CDT 2008


On Wed, 2008-07-02 at 21:21 -0500, Robert Kern wrote:
> On Wed, Jul 2, 2008 at 20:23, David Cournapeau
> <cournapeau@cslab.kecl.ntt.co.jp> wrote:
> 
> > I think that import numpy.core being slower than import numpy is a bug
> > which can be solved without breaking anything, though.
> 
> It does not appear to be slower to me.
> 

It isn't either on my computer.

While we are talking about import timings, there was a system for lazy
import at some point, right (this is when I first tried python and numpy
a few years ago, so I may mix with something else) ? Because we could
win between 20 and 40 % time of import by lazily importing a few modules
(namely urllib, which I guess it not often used, and already takes
around 20-30 ms; inspect and compiler are takinh a long time too, but
maybe those are always needed, I have not checked carefully). Maybe this
would be complicated to implement for numpy, though.

cheers,

David




More information about the Numpy-discussion mailing list