[SciPy-Dev] Enabling use of scipy.special from Numba

Nathaniel Smith njs at pobox.com
Thu Jun 20 20:30:26 EDT 2019


On Thu, Jun 20, 2019 at 1:41 PM Stanley Seibert <sseibert at anaconda.com> wrote:
>
> Well, we'd prefer not to have an unnecessary indirection (and the overhead of making a nested call to the scalar inside the length 1 loop) since the user is doing their own iteration in Numba, but if that's the only option, we can certainly work around it.

Well, it's computers, so there's never just one option :-). But if you
can consume existing ufuncs and get 95% of the performance, then it
might not be worth building custom infrastructure to expose
scipy.special's raw scalar functions + an ad hoc metadata format + ad
hoc tools to consume the metadata. Intuitively it seems like a few
extra integer operations at entry and exit might not be noticeable at
all compared to the cost of computing a bessel function or whatever,
but I haven't checked.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the SciPy-Dev mailing list