Merge pull request #2311 from tshort/faster-cov

Faster cov and cor
Merge branch 'faster-cov'