Set an array of doubles in one step, rather than individually in loops.

The latter is massively slow, apparently.

Change-Id: I689643330e1b04eff7d9665de5d6e423906517e1
This commit is contained in:
Kohei Yoshida
2013-07-12 11:09:38 -04:00
parent d1fc3fce16
commit 1a74c58bea

View File

@@ -73,14 +73,8 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres
for (size_t nCol = 0; nCol < nColSize; ++nCol)
{
const double* pArray = rArrays[nCol];
for (size_t nRow = 0; nRow < nRowSize; ++nRow)
{
if (nRowStart + nRow < p2->GetArrayLength())
{
double fVal = pArray[nRowStart+nRow];
pMat->PutDouble(fVal, nCol, nRow);
}
}
pArray += nRowStart;
pMat->PutDouble(pArray, nRowSize, nCol, 0);
}
ScMatrixToken aTok(pMat);