Untitled
unknown
python
a month ago
982 B
6
Indexable
Never
In [15]: import numpy as np ...: ...: size = (10_000, 15) ...: X = np.random.normal(size=size) ...: %timeit func(X) # 1.28 s ...: %timeit func_numba(X) # 2.05 s 144 ms ± 823 μs per loop (mean ± std. dev. of 7 runs, 10 loops each) 181 ms ± 1.62 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) In [16]: import numpy as np ...: ...: size = (10_000, 15) ...: X = np.random.normal(size=size) ...: %timeit func(X) # 1.28 s ...: %timeit func_numba(X) # 2.05 s 143 ms ± 960 μs per loop (mean ± std. dev. of 7 runs, 10 loops each) 93.9 ms ± 332 μs per loop (mean ± std. dev. of 7 runs, 10 loops each) In [17]: import numpy as np ...: ...: size = (10_000, 15) ...: X = np.random.normal(size=size) ...: %timeit func(X) # 1.28 s ...: %timeit func_numba(X) # 2.05 s 145 ms ± 1.2 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) 203 ms ± 1.15 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
Leave a Comment