summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-07-12 11:09:38 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-12 22:58:39 -0400
commit1a74c58bea4619de03bec6fa1fe00b51dd8e7d73 (patch)
treeb49ba605593e2f8e73a61fb9358a2d032d94f954 /sc
parentd1fc3fce16172d7d619b6826de44528030ab36f8 (diff)
Set an array of doubles in one step, rather than individually in loops.
The latter is massively slow, apparently. Change-Id: I689643330e1b04eff7d9665de5d6e423906517e1
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/formulagroup.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index 5a2351198310..6573d1544405 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -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);