Speed of exp function for skew hermitian matrices

Have you tried using MKL (which MATLAB is using by default)? I see a massive speedup, although it is so large that I don’t trust it:

julia> @btime exp(-1im*pi*a)
  167.400 μs (16 allocations: 14.34 KiB)

julia> using MKL

julia> @btime exp(-1im*pi*$a);
  7.600 μs (16 allocations: 14.34 KiB)

(I have checked however that the result is the same for OpenBLAS and MKL, and the timing difference remains when switching back and forth between backends)

2 Likes