numpile - 基于LLVM的微型python科学计算specializer
jopen
10年前
numpile 是一个基于LLVM、只有1000行代码的微型python科学计算specializer。
from numpile import autojit @autojit def dot(a, b): c = 0 n = a.shape[0] for i in range(n): c += a[i]*b[i] return c a = np.array(range(1000,2000), dtype='int32') b = np.array(range(3000,4000), dtype='int32') print dot(a,b)