[SciPy-User] Bottleneck 0.4.1

josef.pktd@gmai... josef.pktd@gmai...
Wed Mar 9 05:55:59 CST 2011


On Tue, Mar 8, 2011 at 11:57 PM, Keith Goodman <kwgoodman@gmail.com> wrote:
> On Tue, Mar 8, 2011 at 8:52 PM, Keith Goodman <kwgoodman@gmail.com> wrote:
>> On Tue, Mar 8, 2011 at 8:18 PM, Wes McKinney <wesmckinn@gmail.com> wrote:
>>> On Tue, Mar 8, 2011 at 10:17 PM, Keith Goodman <kwgoodman@gmail.com> wrote:
>>
>>>>> One random question. Any idea on the long import time:
>>>>>
>>>>> $ time python -c "import bottleneck"
>>>>>
>>>>> real    0m0.712s
>>>>> user    0m0.546s
>>>>> sys     0m0.114s
>>>>> $ time python -c "import numpy"
>>>>>
>>>>> real    0m0.142s
>>>>> user    0m0.090s
>>>>> sys     0m0.049s
>>>>> $ time python -c "import scipy"
>>>>>
>>>>> real    0m0.201s
>>>>> user    0m0.132s
>>>>> sys     0m0.066s
>>>>
>>>> Bottleneck has many low-level functions, for example,
>>>> median_2d_float64_axis0, median_2d_float64_axis1,
>>>> median_2d_int32_axis0, etc, etc. Maybe that explains it? But scipy has
>>>> a lot of functions too, so I don't know.
>>>
>>> Yeah, I thought this was odd. Initially I thought perhaps it was due
>>> to the size of the DLLs. func.so and move.so but they are only 3 mb or
>>> so on my machine.
>
> ...the binaries are not massive but the function count is very high.
>
>> The timings on my machine (64-bit Ubuntu 10.10) are not quite as bad:
>>
>> $ time python -c "import bottleneck"
>> real    0m0.192s
>> user    0m0.150s
>> sys     0m0.040s
>>
>> $ time python -c "import numpy"
>> real    0m0.060s
>> user    0m0.030s
>> sys     0m0.030s
>>
>> $ time python -c "import scipy"
>> real    0m0.091s
>> user    0m0.040s
>> sys     0m0.050s
>>
>> I'm interested in ways to cut the import time if anyone knows of any.

import scipy is fast because it just imports numpy and the scaffolding
for scipy.
It`s not importing any big subpackages, so the import time comes with
import scipy.subpackage.

Josef


>>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list