<div dir="ltr">Numba does have a mechanism for exporting pre-compiled code: <a href="http://numba.pydata.org/numba-doc/dev/user/pycc.html">http://numba.pydata.org/numba-doc/dev/user/pycc.html</a><div><br></div><div>It would be interesting to see if those limitations are flexible enough for SciPy.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 6, 2018 at 1:21 PM CJ Carey <<a href="mailto:perimosocordiae@gmail.com">perimosocordiae@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think adding a required runtime dependency may be overly restrictive, given scipy's position near(-ish) the base of the scientific computing pyramid.<div><br></div><div>Would it be possible to run numba-optimized code on systems with numba installed without impacting "vanilla" users?</div></div><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 6, 2018 at 3:03 PM Tyler Reddy <<a href="mailto:tyler.je.reddy@gmail.com" target="_blank">tyler.je.reddy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Interesting discussion. Would our plan be to support both side-by-side for a while & just see what happens with the evolution of the ecosystem? If there's no clear winner in the short-term would we discourage PRs that simply migrate from Cython to numba for say 1.5 x performance increase? What about an algorithm that mixes the two approaches -- some numba and some Cython components for whatever reason -- is that discouraged?<br><br></div><div>It looks like numba plays ok with airspeed velocity -- presumably mixing Cython / numba in our suite will be ok?<br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 5 March 2018 at 21:06, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,<br><br></div><div>Goal of this email: start a discussion to decide whether we'd be okay with relying on Numba as a dependency, now or in 1-2 years' time.<br><br></div><div>Context: in <a href="https://github.com/pydata/sparse/issues/126" target="_blank">https://github.com/pydata/sparse/issues/126</a> a discussion is ongoing about whether to adopt Cython or Numba, with Numba being preferred by the majority. That `sparse` package is meant to provide sparse *arrays* that down the line should either be replacing our current sparse *matrices* or at least be integrated in scipy.sparse in addition to them. See <a href="https://github.com/scipy/scipy/issues/8162" target="_blank">https://github.com/scipy/scipy/issues/8162</a> and <a href="https://github.com/hameerabbasi/sparse-ndarray-protocols" target="_blank">https://github.com/hameerabbasi/sparse-ndarray-protocols</a> for more details on that.<br><br></div><div>Also related is the question from Serge Guelton some weeks ago about whether we'd want to rely on Pythran: <a href="https://mail.python.org/pipermail/scipy-dev/2018-January/022325.html" target="_blank">https://mail.python.org/pipermail/scipy-dev/2018-January/022325.html</a><br><br></div><div>On that Pythran thread I commented that we'd want to take these aspects into account:<br>- portability<br>- performance<br>- maturity<br>- maintenance status (active devs, how quick do bugs get fixed after a<br>release with an issue)<br>- ease of use (@jit vs. Pythran comments vs. translate to .pyx syntax)<br>- size of generated binaries<br>- templating support for multiple dtypes<br>- debugging and optimization experience/tool<br><br></div><div>Debugging is one of the ones where I'd say Numba is still worse than Cython, however that's being resolved as we speak: <a href="https://github.com/numba/numba/issues/2788" target="_blank">https://github.com/numba/numba/issues/2788</a><br><br></div><div>One thing I missed in the above list is dependencies: while our use of Cython only adds a build-time dependency, Numba would add a run-time dependency. Given that binary wheels and conda packages for all major platforms are available that's not a showstopper, but it matters.<br><br></div><div>Overall I'd say that:<br>- Numba is better than Cython at: performance, ease of use, size of generated binaries, and templating support for multiple dtypes. Possibly also maintenance status right now.<br></div><div>- Numba and Cython are about equally good at portability (I think, not much data about exotic platforms for Numba).<br></div><div>- Cython is better than Numba at: maturity, debugging (but not for long anymore probably), dependencies.<br><br></div><div>I'm usually pretty conservative in these things, but considering the above I'm leaning towards saying use of Numba should be allowed in the future. The added run-time dependency is the one major downside that's going to stay, however compared to our Fortran headaches that's a relatively small issue.<br><br></div><div>Thoughts?<br><br></div><div>Cheers,<br></div><div>Ralf<br><br><br></div></div>
<br>_______________________________________________<br>
SciPy-Dev mailing list<br>
<a href="mailto:SciPy-Dev@python.org" target="_blank">SciPy-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scipy-dev</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>
SciPy-Dev mailing list<br>
<a href="mailto:SciPy-Dev@python.org" target="_blank">SciPy-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scipy-dev</a><br>
</blockquote></div>
_______________________________________________<br>
SciPy-Dev mailing list<br>
<a href="mailto:SciPy-Dev@python.org" target="_blank">SciPy-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/scipy-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/scipy-dev</a><br>
</blockquote></div>