diff options
author | dante <dante19031999@gmail.com> | 2021-05-13 10:32:33 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-05-15 10:39:24 +0200 |
commit | 63b897c36afbfb85e0dd45907f76727f7dee494e (patch) | |
tree | 9f8270fba8e5fa4dba8821aebc996c83f7b517b0 /sdext | |
parent | 7e8e7bdd5ee037d6ce627a941bc25561bbaf0584 (diff) |
Use less memory for ScMatrix::Collect
The old definition would have unused mnCount s.
The template has been modified to expand functionality.
Redefined operator for sum and sum square.
Memory usage change explanation:
The old code would use an array of IterateResultMultiple.
Then use them to iterate.
The count is stored in a last IterateResultMultiple.
So if we are inputed N operators we are:
Wasting N counters.
Wasting 1 accumulator.
Solution:
We move the array to the accumulator place (inside the structure).
Then we use only N accumulators.
The structure with the array has only 1 counter.
Change-Id: I76de74214d9bcb245f009e1226020bfe4dce40d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115542
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sdext')
0 files changed, 0 insertions, 0 deletions