[Numpy-discussion] chebyshev, laguerre, ... exec() template code at each import
Charles R Harris
Tue Aug 6 21:37:10 CDT 2013
On Tue, Aug 6, 2013 at 8:32 PM, Andrew Dalke <email@example.com>wrote:
> Hi all,
> I mostly develop software related cheminformatics. There
> isn't much direct overlap between the tools of that field
> and NumPy and SciPy provide, but it's increasing with the
> use of scikit-learn and pandas.
> I tend to write command-line tools which indirectly
> import numpy. I've noticed that 25% of the "import numpy"
> cost of about 0.081 seconds is due to the chebyshev, laguerre,
> legendre, hermite_e, and hermite_e modules. Each module
> takes about 0.004 seconds to import.
> This is because each of them does a:
> exec(polytemplate.substitute(name='Chebyshev', nick='cheb',
> during import. It appears that *everyone* takes a 0.02 second
> overhead during "import numpy" in order to simplify maintenance.
> This balance doesn't seem correct, given the number of people
> who use numpy vs. how rarely the polytemplate changes.
> Last year I submitted a patch which pre-computed all of those
> templates, so they would only be byte-compiled once.
> I knew (and still know) almost nothing about git/github, so
> Scott Sinclair kindly took it up and made it a pull request at:
> I see that there's been no activity for at least 10 months.
> Is there anything more I can do to encourage that this patch
> be accepted?
I haven't forgotten and intend to look at it before the next release.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion