JuliaLang/julia — pull request #8403 by timholy (2014-09-18 15:18:22+00:00)
Title: Use constants for BLAS chars (speed up Cholesky factorization of small matrices)

Surprisingly, for small matrices, much of the time is spent writing symbols as strings to pass to LAPACK. Here's a test & demo:
```julia
function choltest(n, iter)
A = rand(n,n)
AtA = A'*A
for k = 1:n
AtA[k] += 1
end
for i = 1:iter
C = cholfact!(AtA)
rand!(A)
At_mul_B!(AtA, A, A)
for k = 1:n
AtA[k] += 1
end
end
end

julia> choltest(2,1)

julia> @time choltest(2,10^6)
elapsed time: 3.412931188 seconds (784016160 bytes allocated, 16.93% gc time)

# But with this PR
julia> @time choltest(2,10^6)
elapsed time: 1.499865128 seconds (224016160 bytes allocated, 9.88% gc time)
```

I'd be very pleased if @andreasnoack would review this. In a couple minutes I'll submit a part 2, which achieves an additional speedup.