JuliaLang/julia — pull request #1625 by ViralBShah (2012-11-28 12:13:26+00:00)
Title: Performance improvements to expm

Some devectorization and direct BLAS/LAPACK calls to get better performance in expm.

````
## New expm
julia> for j=1:length(L)
print("N = ",L[j]," ");tic()
for i=1:10
A=rand(L[j],L[j])
myexpm(A)
end
t[j]=toc();

end
N = 4 elapsed time: 0.000244140625 seconds
N = 5 elapsed time: 0.0002598762512207031 seconds
N = 6 elapsed time: 0.0002231597900390625 seconds
N = 7 elapsed time: 0.0002601146697998047 seconds
N = 8 elapsed time: 0.0002739429473876953 seconds
N = 16 elapsed time: 0.0006530284881591797 seconds
N = 32 elapsed time: 0.002087116241455078 seconds
N = 64 elapsed time: 0.007458925247192383 seconds
N = 128 elapsed time: 0.0708160400390625 seconds
N = 160 elapsed time: 0.09946298599243164 seconds
N = 192 elapsed time: 0.1484978199005127 seconds
N = 256 elapsed time: 0.2939589023590088 seconds
N = 384 elapsed time: 0.8072021007537842 seconds
N = 512 elapsed time: 1.784566879272461 seconds

# Old expm
julia> for j=1:length(L)
print("N = ",L[j]," ");tic()
for i=1:10
A=rand(L[j],L[j])
expm(A)
end
t[j]=toc();

end
N = 4 elapsed time: 0.007039070129394531 seconds
N = 5 elapsed time: 0.0002779960632324219 seconds
N = 6 elapsed time: 0.00030517578125 seconds
N = 7 elapsed time: 0.0003330707550048828 seconds
N = 8 elapsed time: 0.0003731250762939453 seconds
N = 16 elapsed time: 0.00090789794921875 seconds
N = 32 elapsed time: 0.0021610260009765625 seconds
N = 64 elapsed time: 0.029937028884887695 seconds
N = 128 elapsed time: 0.09482717514038086 seconds
N = 160 elapsed time: 0.15769004821777344 seconds
N = 192 elapsed time: 0.22134780883789062 seconds
N = 256 elapsed time: 0.4033329486846924 seconds
N = 384 elapsed time: 1.0891180038452148 seconds
N = 512 elapsed time: 2.162303924560547 seconds
````