Skip to content
Snippets Groups Projects
Commit 62b2ac16 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

performance fix in Covcor

parent 63bde4ae
Branches
No related tags found
No related merge requests found
......@@ -472,10 +472,10 @@ public final class Covcor extends RExternalBuiltinNode {
} else {
sum = 0.0;
loopLength.profileLength(n);
double[] u = Arrays.copyOfRange(xData, i * n, i * n + n);
double[] v = Arrays.copyOfRange(xData, j * n, j * n + n);
for (int k = 0; loopLength.inject(k < n); k++) {
temp[k] = (u[k] - xxm) * (v[k] - yym);
double u = xData[i * n + k];
double v = xData[j * n + k];
temp[k] = (u - xxm) * (v - yym);
}
for (int k = 0; loopLength.inject(k < n); k++) {
sum += temp[k];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment