The main problem here is that Complex
is an abstract type, you probably wanted Complex{Float64}
or something. Which means you were getting an extremely generic, extremely slow, fallback version of *
:
julia> a, b = ones(ComplexF64, 100, 100), ones(ComplexF64, 100, 100);
julia> @btime $a * $b;
130.298 μs (2 allocations: 156.33 KiB)
julia> a, b = ones(Complex, 100, 100), ones(Complex, 100, 100);
julia> @btime $a * $b;
65.006 ms (2030002 allocations: 62.03 MiB)
julia> 130298 / 65
2004.5846153846153
Once this is fixed, you are measuring only the speed of the BLAS library which actually does such mutiplication, not Julia nor Matlab. The defaults vary, you may wish to install MKL.jl if this is the bottleneck.