JuliaLang/julia — pull request #7359 by timholy (2014-06-21 22:36:51+00:00)
Title: Faster cumsum & cumprod. Fixes #7342.

Should we export `cumsum!` and `cumprod!`?

Note if you include the `copy` operation that would have been needed in https://github.com/JuliaLang/julia/issues/7342#issuecomment-46765487, this implementation is actually a little faster because it only needs to make one pass through the data rather than two.