> The lack of this specific issue appearing in say Python may be that the > relative speed penalty is not that large? It seems that one of the strong > features of Julia is its speed, having to deal with complex numbers in this > way means that people have to pay more attention to coding than when using > other languages.
One of the reasons that Julia is as fast as it is, is because when there is a choice between fast and convenient, Julia (usually) picks the fast choice. Another example is that Julia uses native integer arithmetic: http://docs.julialang.org/en/release-0.3/manual/faq/#why-does-julia-use-native-machine-integer-arithmetic see also https://github.com/JuliaLang/julia/issues/855 (But this behavior is not without critique) Python, R and Matlab often take the convenient choice, maybe as a small speed penalty does not matter to them? > I can imagine that if I wanted to have code running as fast as possible in > say a case where I don't know if eigen values will be real or complex, I > could code for both cases within the file and take branches according? Does > that approach even make any sense in the context of Julia? You should try out Julia a bit more! Julia's multiple dispatch makes it super easy and natural to write code which works with several types: just define methods for each type where it matters and generic ones where it doesn't. Voila! Concerning the eigenvalues, if you don't know whether they are real or not then you should default to complex.
