A collection of commonly used statistical functions designed to fuse under stream fusion, with attention paid to the generated assembly.
These are high performance replacements for various list functions, implemented in pure Haskell using stream fusion for sequences.
To illustrate the performance gap, consider the task of calculating the numerically stable mean of a sequence of 1e9 double values.
Using the standard list implementation provided by the hstats package,
$ time ./mean 3.141592653589793 ./mean 26.80s user 0.08s system 99% cpu 26.965 total
And this package,
$ time ./mean 3.141592653589793 ./mean 5.59s user 0.00s system 99% cpu 5.606 total