JuliaLang/julia — pull request #6974 by simonster (2014-05-26 18:43:29+00:00)
Title: Use BLAS for pairwise sumabs2 when possible

Here's a comparison of the performance and error (for Normal(0, 1) input compared to `sum_kbn(abs2(x))`) for the current algorithm, plain `BLAS.dot`, and this pairwise algorithm on my Sandy Bridge system:

![comparison](https://cloud.githubusercontent.com/assets/470884/3084974/c4e1f3dc-e504-11e3-8367-5adbc489617f.png)

I'm not sure whether a pairwise algorithm is truly necessary for most applications of this method, but this PR appears to greatly reduce the performance cost while still providing greater accuracy. cc @lindahua