What is the difference between np.float64 and np.double?
numpy, precision, python
Solution
I think you're comparing apples with oranges.
The first bench is basically `a * b` but the second `a * a`.
I suspect much less cache misses for the latter.
Problem
I tried running the following code to find out the difference between `float64` and `double` in `numpy`. The result is interesting as type double takes almost double the time compared with time taken for multiplication with `float64`. Need some light on this. ``` import time import numpy as np datalen = 100000 times = 10000 a = np.random.rand(datalen) b = np.random.rand(datalen) da = np.float64(a) db = np.float64(a) dda = np.double(a) ddb = np.double(b) tic = time.time() for k in range(times): dd = dda * ddb toc = time.time() print (toc - tic), 'time taken for double' tic = time.time() for k in range(times): d = da * db toc = time.time() print (toc - tic), 'time taken for float64' ```