Hi everyone, I'm Mohamed , a CS student interested in contributing to LibreOffice as part of GSoC. I'm currently investigating in bug *tdf#89387* regarding the performance of CalculateSlopeIntercept in interpr4.cxx.
The current implementation uses a nested loop with GetDouble(i,j), which involves repeated overhead for matrix lookups. I considered using a faster iterator-based approach (like mdds block iterators), but I realized this might break positional alignment if the two matrices (X and Y) have different structures of numeric/string blocks. Before I go deeper into implementing a custom "Synchronized Iterator" or a more optimized way to fetch data, I wanted to ask for advice: 1. Is there a recommended way to iterate over two matrices simultaneously while skipping non-numeric cells efficiently? 2. Should I focus on improving ScInterpreter logic, or is it better to move the calculation into ScMatrix itself ? I would appreciate any pointers to similar optimizations in the codebase. Best regards, Mohamed.
