在numba中jit和autojit有什么区别?

2024-03-29 08:22:59 发布

您现在位置:Python中文网/ 问答频道 /正文

我对jitautojit之间的区别感到困惑。

我读过:

http://numba.pydata.org/numba-doc/0.6/doc/userguide.html

但不能说我知道在这两种选择中有信心。有人能详细说明一下吗,最好是举个例子。

谢谢你


Tags: orghttpdochtml例子jitpydatanumba
1条回答
网友
1楼 · 发布于 2024-03-29 08:22:59

我应该读一下这篇文章,这是为了更新版本的numba。

http://numba.pydata.org/numba-doc/0.15.1/tutorial_firststeps.html#compiling-a-function-with-numba-jit-using-an-explicit-function-signature

2)jit(功能)——>;调度员

Same as old autojit.  Create a dispatcher function object that
specialize at call site.

Example:

    @jit
    def foo(x, y):
        return x + y

http://numba.pydata.org/numba-doc/0.15.1/tutorial_firststeps.html#compiling-a-function-without-providing-a-function-signature-autojit-functionality

Starting with numba version 0.12, it is possible to use numba.jit without providing a type-signature for the function. This functionality was provided by numba.autojit in previous versions of numba. The old numba.autojit hass been deprecated in favour of this signature-less version of numba.jit.

相关问题 更多 >