Closed paolobarbolini closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.21%. Comparing base (
9d4c2e6
) to head (da83b8a
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
PR Details
Avoids large copies when dealing with
getSharedFormula
, which is called byCalcCellValue
, increasing the performance of evaluating formulas in cells.Description
According to https://stackoverflow.com/a/45786922 uses of
range
ingetSharedFormula
caused large copies of objects, which would show-up in flamegraphs asruntime.duffcopy
. Changing to a loop with indexing avoids the copying.Related Issue
1836
Motivation and Context
It cuts out about 40% of execution time from
CalcCellValue
.Compared to the one in the issue, the flamegraph now looks like this:
How Has This Been Tested
I've run the patched version inside my program and observed the calculations work as they did before. I've also run
go test
.Types of changes
Checklist