hi. here is example code.
my english is poor. sorry.
data = RANDOMU(seed, 2e3, 2e3, /double)
; using idl matrix multiply
tmp = tic()
res_idl = data##data
idl_time = toc(tmp)
; using python
; www.slither4idl.com
py = pyimport('__main__')
py.EXEC, 'from numpy import dot'
tmp = tic()
res_py = py.DOT(data, data)
py_time = toc(tmp)
; 8 times faster in my computer
PRINT, 'idl elapsed time', idl_time
PRINT, 'python elapsed time', py_time
PRINT, ' '
PRINT,'result difference between idl and python', MAX(res_idl - res_py, /abs) ; same result
My computer, eight times faster about Python.
Is there a plan to increase the matrix calculation speed?
thanks
|