Monday, 26 August 2013

Why is x**3 slower than x*x*x=?iso-8859-1?Q?=3F_=96_stackoverflow.com?=

Why is x**3 slower than x*x*x? – stackoverflow.com

In NumPy, x*x*x is an order of magnitude faster than x**3 or even
np.power(x, 3). x = np.random.rand(1e6) %timeit x**3 100 loops, best of 3:
7.07 ms per loop %timeit x*x*x 10000 loops, best of 3: …

No comments:

Post a Comment