JuliaStats / Statistics.jl

The Statistics stdlib that ships with Julia.
https://juliastats.org/Statistics.jl/dev/
Other
71 stars 40 forks source link

Optimize `cov` and `cor` with identical arguments #166

Closed devmotion closed 3 months ago

devmotion commented 5 months ago

When reviewing https://github.com/JuliaStats/StatsBase.jl/pull/923, I noticed that StatsBase uses a custom _cov function internally to improve performance of cov calls in pairwise invocations when both arguments of cov are identical. My feeling is that it would be better if such optimizations would be performed by Statistics.cov automatically.